dcsimg
Results 1 to 3 of 3

Thread: Trying to retain a value in DropDownList after a Postback?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    4,857

    Trying to retain a value in DropDownList after a Postback?

    I have 3 DropDownList controls on a webpage. Based on the value of the first dropdownlist selected, the second ddl is populated and then the third ddl is populated based on the value of the second ddl. The problem I'm having is, when a Print button is clicked, it basically prints the page as is with all the values. However, when the Print Preview page shows up, the values in the ddl's are gone. How can I prevent this?

    Thanks,
    Blake

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    5,354

    Re: Trying to retain a value in DropDownList after a Postback?

    You can play with page.ispostback a little .
    You should retain a value this way.
    Check https://docs.microsoft.com/en-us/dot...ramework-4.7.2
    Slow as hell.

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    4,857

    Re: Trying to retain a value in DropDownList after a Postback?

    Sorry...but that really didn't show me much! I'm familiar with checking the IsPostback flag.
    Blake

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width