1
嗨我有以下示例剃鬚刀腳本>現在我需要擴展此並添加if語句後@foreach(DataRow行在Dnn.ReportResults()。行)與if語句檢查是否querystytring值foo是同一個名爲foo列的值,如果這是正確的,TNE行可以呈現幫助一個開始程序員的剃刀
<table>
<thead>
@{var table = Dnn.ReportResults();}
<tr>
@foreach (DataColumn col in table.Columns)
{
<th>@col.ColumnName</th>
}
</tr>
</thead>
<tbody>
@foreach (DataRow row in Dnn.ReportResults().Rows)
{
<tr>
@foreach (var value in row.ItemArray)
{
<td>@value</td>
}
</tr>
}
</tbody>
</table>
感謝您的幫助
各種嘗試用如果的Request.QueryString [ 「富」]我coudl得到它在普通的C#asp.net應用工作。我想我只需要在剃鬚刀設置中看到它,我一定錯過了}或@ – nokiko 2011-05-06 07:35:06