如果没有注册会话,单击面板显示登录框时会出现此问题。
以下是小组:
<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行是否正确