<table width="868px" border="0" cellspacing="0" cellpadding="0"><tr style="background-color:#E0E0E0"> <%
string loadPage = "";//首页
string MenuID = new Maticsoft.BLL.school.vn_sys_Oprator().GetModel(Convert.ToInt32(Session["UserID"].ToString())).MenuID; // 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。
System.Data.DataTable dt1 = new Maticsoft.BLL.school.vn_sys_Oprator().GetList(" ParentId=0").Tables[0];
if (dt1.Rows.Count > 0)
{
for (int j = 0; j < dt1.Rows.Count; j++)
{
if (MenuID.IndexOf("," + dt1.Rows[j]["id"].ToString() + ",") > -1)
{
loadPage = dt1.Rows[0]["PagePath"].ToString() + "?id=" + dt1.Rows[0]["ID"].ToString();
%>
<td style="height: 16px"><a href="<%=dt1.Rows[j]["PagePath"].ToString() %>?id=<%=dt1.Rows[j]["ID"].ToString() %>" target="center" class="fei2"><%=dt1.Rows[j]["MenuName"].ToString() %></a></td>
<%
}
}
}
%>
<td style="height: 16px">
</td>
</tr></table>
string loadPage = "";//首页
string MenuID = new Maticsoft.BLL.school.vn_sys_Oprator().GetModel(Convert.ToInt32(Session["UserID"].ToString())).MenuID; // 异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。
System.Data.DataTable dt1 = new Maticsoft.BLL.school.vn_sys_Oprator().GetList(" ParentId=0").Tables[0];
if (dt1.Rows.Count > 0)
{
for (int j = 0; j < dt1.Rows.Count; j++)
{
if (MenuID.IndexOf("," + dt1.Rows[j]["id"].ToString() + ",") > -1)
{
loadPage = dt1.Rows[0]["PagePath"].ToString() + "?id=" + dt1.Rows[0]["ID"].ToString();
%>
<td style="height: 16px"><a href="<%=dt1.Rows[j]["PagePath"].ToString() %>?id=<%=dt1.Rows[j]["ID"].ToString() %>" target="center" class="fei2"><%=dt1.Rows[j]["MenuName"].ToString() %></a></td>
<%
}
}
}
%>
<td style="height: 16px">
</td>
</tr></table>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货