在我的应用程序中,我有一个用户填写的表格,然后得到经理的批准。我有各种类型的表单都使用相同的流程,因此批准按钮都是通过用户控件完成的(其中包括更新数据库中的数据和调用回发的功能)。
但是,一旦我单击“批准”按钮(位于用户控件中),表单信息就不会更新(它仍然显示“未批准”)。回发肯定会发生,但不确定为什么页面没有正确更新。
我可以确认正在进行更改 - 当我手动重新加载页面时,它会更新 - 但不是在回帖中。
我在这里想念什么?
我的页面:
protected void Page_Load(object sender, EventArgs e)
{
int ID;
// ensure that there's an ID set in the query string
if (Int32.TryParse(Request.QueryString["ID"], out ID))
PopulatePage(ID);
else
Response.Redirect("~/Default.aspx");
}
}
protected void PopulatePage(int ID)
{
using (WOLinqClassesDataContext db = new WOLinqClassesDataContext())
{
lblStatus.Text = wo.Workorder.status;
....
}
}