我有这样的 Page_load 方法:
private void Page_Load(object sender, System.EventArgs e)
{
    if (!IsPostBack)
    {
        // Load Content
        LoadContent();
        return;
        }
     // some code here
}
我Response.Redirect(Request.Url.AbsoluteUri)在方法的末尾使用了防止页面刷新导致的重新发布操作。当我从运行良好的源代码(调试或运行模式)运行我的应用程序时,但是当我发布应用程序(即使在同一台机器上)时,页面数据(加载到 LoadContent)不会在更新的页面上更新(而是重新发布动作被阻止)。
拜托,谁能告诉我为什么会这样?
添加:
有LoadContent()方法:
    // firstly I get an supervisedGroups list TIBCO iProcess Engine via .NET vendor library, and then:
    if (supervisedGroups != null)
    {
        rptSupervisedGroups.DataSource = supervisedGroups; // rpt.. is Repeater
        rptSupervisedGroups.DataBind();
    }
添加:
使用 Response.Redirect 的方法:
private void removeFromGroup(string strGroupName)
{
  using(SqlConnection con = DBHelper.GetNewConnection())
  {
      con.Open();
      // here comes query to DB     
  }
  // Reload Page
  Response.Redirect(Request.Url.AbsoluteUri);
}