Results 1 to 3 of 3

Thread: Reg Query string

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2005
    Posts
    41

    Reg Query string

    hey guys ,

    Just help me out with this.

    I have asp.net application with c# as code behind. I have a drop down that

    displays a list of selected values. The drop down is bound to a data source control and when i choose a value it displays and click on the button , it displays reports. The url of the page looks something like this.

    http://localhostort/default.aspx

    what i want is it should display the same data as the result but when i click the button it shud display the the selected value in the query string and yet show the same result.

    The url shud look something like this

    http://localhotsort/default.aspx? id = selected value in the drop down

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

    Re: Reg Query string

    Is the form set to POST as opposed to GET?

    Parksie

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Reg Query string

    In the Page Load event, do a postback check and if the page is being posted back, do not re-bind the dropdownlist. You can then access the selected item in the dropdownlist and populate the rest of your page with that value, or redirect to default.aspx?id=...

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