Results 1 to 5 of 5

Thread: querystrings and autopostback

  1. #1

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258

    querystrings and autopostback

    How do I have a contol postback and include a querystring?

    I have a listbox and when the user clicks a selection, I want to pass listbox.selecteditem.text as a querystring.

    Thanks for any info.

  2. #2
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    Do an event handler for its onClick event and post the selected items as a querystring
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  3. #3

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258
    Can you give some example code please? The only way I know how is
    VB Code:
    1. response.write "<a href='myasp.asp?dir=d:/'>link</a>"


    I don't know what to put in the click event

    VB Code:
    1. private sub ListBox1_onclick()
    2. ???????
    3. end sub


    Thx

  4. #4
    Hyperactive Member SoftwareMaker's Avatar
    Join Date
    Mar 2001
    Location
    Elbonia with Dilbert and Wally
    Posts
    322
    visual basic code:--------------------------------------------------------------------------------
    private sub ListBox1_onclick()
    Response.Redirect ("SomePage.aspx?id=" & ListBox1.SelectedIndex)
    end sub
    --------------------------------------------------------------------------------
    William T
    Software Architect / Chief Software Developer
    Softwaremaker.Net Pte Ltd
    http://www.Softwaremaker.net

    *** Things are always the darkest before they go pitch black ***

  5. #5

    Thread Starter
    Hyperactive Member Sneeden's Avatar
    Join Date
    Oct 2001
    Location
    Sneedville
    Posts
    258
    OK, That is nice and easy.
    Thanks.

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