How can I pass input from one page another to be displayed on the next

page?

I have been looking for examples but have not been successful. What I have is an input field for name, birth date, and phone number in an aspx file. What I want to do is pass the content of those fields to another page to be displayed on that page. OR what I would also like to learn is how to display the same input on the original form page but the form I do not want visible anymore.

Any help will be greatly appreciated! Thanks a bunch!

Comments

  • there are many ways by which you can achieve this some of them are as follows
    1.using cookies
    2.using variables
    3.using url itself to pass the parameters to the next page

    third one with example is given as follows,

    using url :-

    when you swich from first page to second use follwing line of code

    response.Redirect("page2.aspx?firstname=" & firstname.text)

    Then to retrieve this value on second page , just do this:
    label1.text = request.querystring("firstname")

    if you want to know how can cookies or variables be used plz inform me i will give you the example

    thanking you,
    mangesh

  • : there are many ways by which you can achieve this some of them are as follows
    : 1.using cookies
    : 2.using variables
    : 3.using url itself to pass the parameters to the next page
    :
    : third one with example is given as follows,
    :
    : using url :-
    :
    : when you swich from first page to second use follwing line of code
    :
    : response.Redirect("page2.aspx?firstname=" & firstname.text)
    :
    : Then to retrieve this value on second page , just do this:
    : label1.text = request.querystring("firstname")
    :
    : if you want to know how can cookies or variables be used plz inform me i will give you the example
    :
    : thanking you,
    : mangesh
    :
    : hai
    iam want to pass an array of values to a datagrid which is
    in another page -- this is working for one set of values
    but if i go back to first page,then i pass another set of values to
    the grid in the second page.... how it is possible without using database
    how can we use session array variables for this

    tks
    latha

  • : : there are many ways by which you can achieve this some of them are as follows
    : : 1.using cookies
    : : 2.using variables
    : : 3.using url itself to pass the parameters to the next page
    : :
    : : third one with example is given as follows,
    : :
    : : using url :-
    : :
    : : when you swich from first page to second use follwing line of code
    : :
    : : response.Redirect("page2.aspx?firstname=" & firstname.text)
    : :
    : : Then to retrieve this value on second page , just do this:
    : : label1.text = request.querystring("firstname")
    : :
    : : if you want to know how can cookies or variables be used plz inform me i will give you the example
    : :
    : : thanking you,
    : : mangesh
    : :
    : : hai
    : iam want to pass an array of values to a datagrid which is
    : in another page -- this is working for one set of values
    : but if i go back to first page,then i pass another set of values to
    : the grid in the second page.... how it is possible without using database
    : how can we use session array variables for this
    :
    : tks
    : latha
    :
    :

    On the first page you would stuff the array in a Session variable, usually in the click event of the button that passes the data to the next page.

    [code]
    Dim someArray() as String
    ' (Add code to load array here)
    Session("values") = someArray
    Response.Redirect("nextPage.aspx", True)
    [/code]

    On the next page you acquire the Session like so ...

    [code]
    If Not Session("values") Is Noting Then
    someArray = CType(Session("values"), String())
    End If
    [/code]




  • : : : there are many ways by which you can achieve this some of them are as follows
    : : : 1.using cookies
    : : : 2.using variables
    : : : 3.using url itself to pass the parameters to the next page
    : : :
    : : : third one with example is given as follows,
    : : :
    : : : using url :-
    : : :
    : : : when you swich from first page to second use follwing line of code
    : : :
    : : : response.Redirect("page2.aspx?firstname=" & firstname.text)
    : : :
    : : : Then to retrieve this value on second page , just do this:
    : : : label1.text = request.querystring("firstname")
    : : :
    : : : if you want to know how can cookies or variables be used plz inform me i will give you the example
    : : :
    : : : thanking you,
    : : : mangesh
    : : :
    : : : hai
    : : iam want to pass an array of values to a datagrid which is
    : : in another page -- this is working for one set of values
    : : but if i go back to first page,then i pass another set of values to
    : : the grid in the second page.... how it is possible without using database
    : : how can we use session array variables for this
    : :
    : : tks
    : : latha
    : :
    : :
    :
    : On the first page you would stuff the array in a Session variable, usually in the click event of the button that passes the data to the next page.
    :
    : [code]
    : Dim someArray() as String
    : ' (Add code to load array here)
    : Session("values") = someArray
    : Response.Redirect("nextPage.aspx", True)
    : [/code]
    :
    : On the next page you acquire the Session like so ...
    :
    : [code]
    : If Not Session("values") Is Noting Then
    : someArray = CType(Session("values"), String())
    : End If
    : [/code]
    :
    :
    :
    :
    :

    tks for responding

    but consider the shopping cart
    we choose a product and the details of this will be displayed on next page in a datagrid
    then we postback to previous page to add another item; now consider
    we have added another item.this item shoul be added to the same datagrid
    tell me how to save the list of values in a datagrid until he logout
    i.e session expires

    tks
    latha

  • : : : : there are many ways by which you can achieve this some of them are as follows
    : : : : 1.using cookies
    : : : : 2.using variables
    : : : : 3.using url itself to pass the parameters to the next page
    : : : :
    : : : : third one with example is given as follows,
    : : : :
    : : : : using url :-
    : : : :
    : : : : when you swich from first page to second use follwing line of code
    : : : :
    : : : : response.Redirect("page2.aspx?firstname=" & firstname.text)
    : : : :
    : : : : Then to retrieve this value on second page , just do this:
    : : : : label1.text = request.querystring("firstname")
    : : : :
    : : : : if you want to know how can cookies or variables be used plz inform me i will give you the example
    : : : :
    : : : : thanking you,
    : : : : mangesh
    : : : :
    : : : : hai
    : : : iam want to pass an array of values to a datagrid which is
    : : : in another page -- this is working for one set of values
    : : : but if i go back to first page,then i pass another set of values to
    : : : the grid in the second page.... how it is possible without using database
    : : : how can we use session array variables for this
    : : :
    : : : tks
    : : : latha
    : : :
    : : :
    : :
    : : On the first page you would stuff the array in a Session variable, usually in the click event of the button that passes the data to the next page.
    : :
    : : [code]
    : : Dim someArray() as String
    : : ' (Add code to load array here)
    : : Session("values") = someArray
    : : Response.Redirect("nextPage.aspx", True)
    : : [/code]
    : :
    : : On the next page you acquire the Session like so ...
    : :
    : : [code]
    : : If Not Session("values") Is Noting Then
    : : someArray = CType(Session("values"), String())
    : : End If
    : : [/code]
    : :
    : :
    : :
    : :
    : :
    :
    : tks for responding
    :
    : but consider the shopping cart
    : we choose a product and the details of this will be displayed on next page in a datagrid
    : then we postback to previous page to add another item; now consider
    : we have added another item.this item shoul be added to the same datagrid
    : tell me how to save the list of values in a datagrid until he logout
    : i.e session expires
    :
    : tks
    : latha
    :
    :

    Personally I would store the shopping cart in the database and the users ID in a cookie.

  • : : : : : there are many ways by which you can achieve this some of them are as follows
    : : : : : 1.using cookies
    : : : : : 2.using variables
    : : : : : 3.using url itself to pass the parameters to the next page
    : : : : :
    : : : : : third one with example is given as follows,
    : : : : :
    : : : : : using url :-
    : : : : :
    : : : : : when you swich from first page to second use follwing line of code
    : : : : :
    : : : : : response.Redirect("page2.aspx?firstname=" & firstname.text)
    : : : : :
    : : : : : Then to retrieve this value on second page , just do this:
    : : : : : label1.text = request.querystring("firstname")
    : : : : :
    : : : : : if you want to know how can cookies or variables be used plz inform me i will give you the example
    : : : : :
    : : : : : thanking you,
    : : : : : mangesh
    : : : : :
    : : : : : hai
    : : : : iam want to pass an array of values to a datagrid which is
    : : : : in another page -- this is working for one set of values
    : : : : but if i go back to first page,then i pass another set of values to
    : : : : the grid in the second page.... how it is possible without using database
    : : : : how can we use session array variables for this
    : : : :
    : : : : tks
    : : : : latha
    : : : :
    : : : :
    : : :
    : : : On the first page you would stuff the array in a Session variable, usually in the click event of the button that passes the data to the next page.
    : : :
    : : : [code]
    : : : Dim someArray() as String
    : : : ' (Add code to load array here)
    : : : Session("values") = someArray
    : : : Response.Redirect("nextPage.aspx", True)
    : : : [/code]
    : : :
    : : : On the next page you acquire the Session like so ...
    : : :
    : : : [code]
    : : : If Not Session("values") Is Noting Then
    : : : someArray = CType(Session("values"), String())
    : : : End If
    : : : [/code]
    : : :
    : : :
    : : :
    : : :
    : : :
    : :
    : : tks for responding
    : :
    : : but consider the shopping cart
    : : we choose a product and the details of this will be displayed on next page in a datagrid
    : : then we postback to previous page to add another item; now consider
    : : we have added another item.this item shoul be added to the same datagrid
    : : tell me how to save the list of values in a datagrid until he logout
    : : i.e session expires
    : :
    : : tks
    : : latha
    : :
    : :
    :
    : Personally I would store the shopping cart in the database and the users ID in a cookie.
    :
    : hai friend
    i too agree that finally we have to save the list of product that the user had decided to buy it
    but imagine that he want to update the list before he
    clicks the confirm order button i.e., confirms the order
    it can be easily done when we use the datagrid in the same webpage
    but to display it in another page; for me seem to be tedious
    i tried with arraylist
    stored it in a session var and passed it to another page
    but the grid displays only the last product that user selects

    plz tell me correct way to use arraylist

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories