关于Iprincipal创建对象的问题
先在Visual Studio中创建一个btnsubmit按钮,然后双击按钮输入
protected void btnsubmit_click(object sender, EventArgs e)
{
Iprincipal myprincipal = this.User; //是错的吗?
string tablestring = " <table border=1><tr><td>Name</td><td>";
tablestring += Server.HtmlEncode(myprincipal.identity.name) + " </td> </tr>";
Response.Write(tablestring);
}
------解决方案--------------------
this.User是啥?实现了IPrincipal 接口?