0

我有一个带有 .aspx.vb 代码的 .aspx 文件,该文件在 Visual Studio 2010 中工作得很好,但在生产中却不行。

最令人不安的是 Page_Load(非 PostBack)仅适用于某些行。这是来自 Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 的代码

    Dim Shortages_Filter As String = ""
    If Not IsPostBack Then

  ' The next four lines work in localhost, but don't work in production
        Alert_Label.Text = "Not Postback"
        Shortages_Filter += "(num_Short_Qty > 0) "

        ddl_Shortages_List.Items.Insert(0, New ListItem("Shortages List Filter", "1=1"))
        ddl_Shortages_List.Items.Insert(1, New ListItem("Show Shortages List", Shortages_Filter))

  ' The next six lines work in both environments
        Pref_DataSource.FilterParameters.Add("User_Name_Param", Replace(System.Web.HttpContext.Current.Request.ServerVariables("LOGON_USER"), "BOUMATIC\", ""))
        Pref_DataSource.FilterParameters.Add("Current_Page_Param", Me.Page.Title)

        Common_Functions.Add_Date_Filters(ddl_Order_Date, "dat_Order_Date", "Order Date")
        Common_Functions.Add_Date_Filters(ddl_Request_Date, "dat_Request_Date", "Request Date")

        Order_Search.Text = Request.QueryString("Order_Num")
        Part_Num_Search.Text = Request.QueryString("Part_Num")

    Else
End If

有什么想法吗?

4

1 回答 1

1

听起来旧DLL版本正在生产中。确保完全编译(完整构建)。

从 Visual Studio中点击Ctrl++ ,然后再次上传。这样做时,请注意 bin 文件夹的文件是否相同。ShiftB

于 2013-08-07T16:45:33.767 回答