我有一个带.aspx.vb代码隐藏页面的.aspx文件,该文件在Visual Studio 2010中运行良好,但未在生产中运行。
最令人不安的是Page_Load(非PostBack)只与某些行一起使用。这是来自Protected Sub Page_Load(ByVal sender As Object,ByVal e As System.EventArgs)处理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
有什么想法吗? 罗布
答案 0 :(得分:1)
听起来像一个较旧的DLL
版本正在制作中。确保完全编译(完整版)。
从Visual Studio中按 Ctrl + Shift + B ,然后重新上传。这样做时,请注意bin文件夹的文件大小是否相同。