<% If Session["type"].ToSting()='su' Then %>
<tr><td>.....
<%End If%>
c# asp.net不好用是为啥啊。

解决方案 »

  1.   

    <% If Session["type"].ToSting()='su' Then %>Session是否为空,你能直接.ToSting()吗c#应该是
    Session["type"].ToSting()=="su"
      

  2.   

    不奇怪的字眼。不好用?
    你直接ToString()如果为NULL是为出异常的
      

  3.   

    if((Session["type"]==null?"":Session["type"].ToString()).Equals("su"))
    {}
      

  4.   

    人生如梦
    sp1234
    帮我看看
    http://topic.csdn.net/u/20100406/16/0cf7b294-00a4-4824-9918-8e6fb63562a9.html?75761