0

全部!

我有一个在事件编辑(按钮编辑)中创建会话的页面。此页面是 UsersNDR.aspx

protected void btnEdit_OnClick(object sender, EventArgs e)
{
    ImageButton btn = (ImageButton)sender;
    GridViewRow row = (GridViewRow)btn.NamingContainer;
    string UserName = row.Cells[0].Text;
    Session["UserEdit"] = UserName;
    Response.Redirect("EditUser.aspx");
}

在 EdistUser.aspx, Page_Load() 中,我阅读了这个 Session 以在 SQL Server 中进行咨询。

    string UserEdit = (string)(Session["UserEdit"]);

在 LocalHost 中,此页面在 Chrome 和 IE9 中正常工作。但是在 IIS 中,在 Chrome 中是 wotk 而不是在 IE9 中。

The parameterized query '(@UserName nvarchar(4000))SELECT UserName,DisplayName,Email,Prof' expects the parameter '@UserName', which was not supplied. 

这是什么问题?

4

0 回答 0