Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. How to persist clientside values

How to persist clientside values

Scheduled Pinned Locked Moved ASP.NET
toolstutorialquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CrazyCoder26
    wrote on last edited by
    #1

    Hi, I am populating a dropdownlist by clientside script.But after every postback the dropdown values vanish.How to persist them? Thanks

    CC26

    B M 2 Replies Last reply
    0
    • C CrazyCoder26

      Hi, I am populating a dropdownlist by clientside script.But after every postback the dropdown values vanish.How to persist them? Thanks

      CC26

      B Offline
      B Offline
      Blue_Boy
      wrote on last edited by
      #2

      DropDownList control have property

      AutoPostBack=true

      If you don't use

      selectedindexchange

      event then set autopostback to false,otherwise post your code and we will see where can be problem.


      I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.

      C 1 Reply Last reply
      0
      • B Blue_Boy

        DropDownList control have property

        AutoPostBack=true

        If you don't use

        selectedindexchange

        event then set autopostback to false,otherwise post your code and we will see where can be problem.


        I Love T-SQL "Don't torture yourself,let the life to do it for you." If my post helps you kindly save my time by voting my post.

        C Offline
        C Offline
        CrazyCoder26
        wrote on last edited by
        #3

        Probably you didn't get my question.I have no problem with dropdownlist autopostback or anything. My problem is that, I am populating a dropdownlist using clientside script.       But whenever my page is postback( say...i clicked a button), all dropdownlist items vanish..How to persist them after postback.

        CC26

        H 1 Reply Last reply
        0
        • C CrazyCoder26

          Hi, I am populating a dropdownlist by clientside script.But after every postback the dropdown values vanish.How to persist them? Thanks

          CC26

          M Offline
          M Offline
          Muhammad Mazhar
          wrote on last edited by
          #4

          May be making use of cookies workout for you.

          Share your experience with others Check my Blog...

          1 Reply Last reply
          0
          • C CrazyCoder26

            Probably you didn't get my question.I have no problem with dropdownlist autopostback or anything. My problem is that, I am populating a dropdownlist using clientside script.       But whenever my page is postback( say...i clicked a button), all dropdownlist items vanish..How to persist them after postback.

            CC26

            H Offline
            H Offline
            himanshu2561
            wrote on last edited by
            #5

            Hi, In that case you have to strore these values in hidden field and bind the dropdown again.

            himanshu

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups