www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Problem When Going To IIS

  1. #1
    Join Date
    Jul 2011
    Posts
    8

    resolved [RESOLVED] Problem When Going To IIS

    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

  2. #2
    Join Date
    Jan 2003
    Location
    Dundee, Scotland
    Posts
    1,367
    can you show the code for the csvsearch.aspx with the label?

    try:

    Code:
          Session("BarCode") = txtBarCode.Text
    then on your other page

    Code:
        TheLabel.Text = Session("BarCode")
    regards

    Ribs
    Last edited by Ribeyed; 07-19-2011 at 04:59 PM.
    ----------------------------------

  3. #3
    Join Date
    Jul 2011
    Posts
    8
    Thanks for the help mate. I just figured out my problem sometime midday today and forgot about this thread. The problem was that the app wasn't connecting to the database. Lame I know

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles