I'm new at putting a web project on IIS and
need some help. My project doesn't behave like it is supposed to. It works fine
on my cheapo web server. On IIS when I click on the submit button in the
default page the app redirects to a csvsearch page. On the csvsearch page a
label should be loaded with a value from one of the session variables from the
default page. It is not happening. I don't get any errors to indicate a sql
connection error or any errors at all actually. Would someone please help me?
Code:Protected Sub btnSubmit_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnSubmit.Click lblInformation.Text = Nothing lblArticle7.Text = Nothing lblArticle7Description.Text = Nothing Try Dim con = ConfigurationManager.ConnectionStrings("CONNSTRING").ConnectionString Dim LabelsInfoList As List(Of CLabels) Dim LabelsObj As New LabelsActionLayer.LabelActionDAL Dim theValue As String = Nothing Dim mpTextBox As TextBox mpTextBox = CType(FindControl("txtBarCode"), TextBox) theValue = mpTextBox.Text LabelsObj.OpenConnection(con) LabelsInfoList = LabelsObj.RetreiveLabelsInfo(theValue) LabelsObj.CloseConnection() If LabelsInfoList.Count > 0 Then lblInformation.Text = LabelsInfoList(0).Barcode ''''the following aren't visible lblArticle7.Text = LabelsInfoList(0).Article7 lblArticle7Description.Text = LabelsInfoList(0).Article7Description Else lblInformation.Text = "That barcode is not in the database." txtBarCode.Focus() Exit Sub End If Session.Add("BarCode", txtBarCode.Text) Session.Add("Article7", lblArticle7.Text) Session.Add("Article7Description", lblArticle7Description.Text) Catch ex As Exception lblError.Text = ex.Message End Try Response.Redirect("csvsearch.aspx") End Sub


Reply With Quote

Bookmarks