Results 1 to 2 of 2

Thread: Redirect on form submission

  1. #1

    Thread Starter
    Fanatic Member venerable bede's Avatar
    Join Date
    Sep 2002
    Location
    The mystic land of Geordies
    Posts
    1,018

    Redirect on form submission

    I have a asp.net web form which contains a Dropdown box and a submit button.

    All I want to do is redirect the user to another page, "anotherpage.aspx"
    and be able to refer to the contents of the chosen item on the dropdown so I
    can open "anotherpage.aspx" at the correct detail record.

    This is driving me nuts. In classic asp I would set the action of the form
    tag to "anotherpage.aspx" and use request.form(dropdownbox).

    Can anyone please point me in the right direction?

    Thanks In Advance dotnetters

    Parksie

  2. #2
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    I suggest that in the codebehind on the button click you do a page redirect with the item chosen in the dropdown as argument to the new aspx page. I don't have any code where I am sitting right now but something like:

    response.redirect("newpage.aspx?item= " + "dropdownlist.text");
    then from the newpage.aspx you can access the item variable as response. querystring or something like that... I can post some code on how to do it if you like...

    kind regards
    Henrik

Posting Permissions

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



Click Here to Expand Forum to Full Width