locked
Response.Redirect two ASP textbox values not working RRS feed

  • Question

  • User876561910 posted

    This “was” working and now it’s not.

    Can you see any problems with it.



    This is the section which has stopped working

    Response.Redirect("NextPage.aspx?Item1=" + txtBox1.Text + "&Item2=" + txtBox2.Text)

    This is part of VB which loads details into a database then send the users to the next page
    The loading into the database is working fine - it's just not passing the value to the next page

    Like this

    <script runat="server" language="vbscript" type="text/vb">
    	Protected Sub FormView1_ItemInserted(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.FormViewInsertedEventArgs) Handles FormView1.ItemInserted
    
    Response.Redirect("NextPage.aspx?Item1=" + txtBox1.Text + "&Item2=" + txtBox2.Text)
    
    End Sub
    




    Sunday, December 30, 2018 10:28 AM

All replies

  • User876561910 posted

    It's OK.
    I worked it out

    Sunday, December 30, 2018 1:48 PM
  • User61956409 posted

    Hi janehollin,

    This is part of VB which loads details into a database then send the users to the next page. The loading into the database is working fine - it's just not passing the value to the next page

    Glad to hear that you find and resolve the problem by yourself. If possible, please share the complete the solution/answer of the problem, which would help other community members resolve similar issues.

    Besides, to troubleshoot this kind of issue, we can set breakpoints inside code and then debug the code step by step to check the actual value(s) of variables or controls(such as txtBox1 and txtBox2). If the controls inside other data control, we should use .FindControl() method to find the specific control first and then get the controls' value.

    With Regards,

    Fei Han

    Tuesday, January 1, 2019 5:45 AM