ASP,javascript面板(显示/隐藏)不会显示ASP文本框

时间:2014-03-23 15:50:44

标签: javascript jquery asp.net

如果没有注册会话,单击面板显示登录框时会出现此问题。

以下是小组:

<div id='demo-header'>
        <a id='login-link' href='#login'>



           <%  If Session("user") Is Nothing Then

                Response.Write("Login Panel")
            Else

                Response.Write("Links")

            End If
            %>



            </a>
        <div id='login-panel'>

 <%  If Session("user") Is Nothing Then

    Response.Write("<p><font color='White'>Username: <br />")
    Response.Write("<asp:TextBox ID='txtUsername' runat='server'>qwerty</asp:TextBox> </font><br />")
    Response.Write("<p><font color='White'>Password:  <br />")
    Response.Write("<asp:TextBox ID='txtPassword' runat='server'></asp:TextBox> <br />")
    Response.Write("<asp:Button ID='Button1' runat='server' Text='Login'>")
    Response.Write("<font color='White'><small>Press ESC to close</small></font> <a title='Register' href='registerUser.aspx'> Register</a>")

            Else

                Response.Write("<table>")
                Response.Write("<tr>")

                Response.Write("<td><a id='login-link' href='#login' title='Login'> <a href='account.aspx'>Account</a></br><a href='logout.aspx'>Logout</a></td>")
                Response.Write("</table>")
                Response.Write("</tr>")

            End If%>  </div>     <!-- /login-panel -->


</div>

我无法显示ASP文本框,但文本显示的空格应该是我的文本框。

我想知道resposne.write行是否正确

0 个答案:

没有答案