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. viewstate of combo box

viewstate of combo box

Scheduled Pinned Locked Moved ASP.NET
databasetutorial
4 Posts 3 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.
  • H Offline
    H Offline
    Harikrk
    wrote on last edited by
    #1

    I am working with a combo box whose contents are taken from DB to populate the db. I have given in the load event to fill the combon box when page is not postbacked. But still each time the page postbacks the combobox is getting filled and so when i select a item in combo box and postback is done i always getting the first value in the combo box. i have set the enableviewstate of combo box as true Can any one tell me how to hold value in the combobox Regards Thanks in advance hari

    P 1 Reply Last reply
    0
    • H Harikrk

      I am working with a combo box whose contents are taken from DB to populate the db. I have given in the load event to fill the combon box when page is not postbacked. But still each time the page postbacks the combobox is getting filled and so when i select a item in combo box and postback is done i always getting the first value in the combo box. i have set the enableviewstate of combo box as true Can any one tell me how to hold value in the combobox Regards Thanks in advance hari

      P Offline
      P Offline
      payback
      wrote on last edited by
      #2

      Do the databinding only the first time when page loads. If Not Page.IsPostBack Then DataBindings End IF

      H 1 Reply Last reply
      0
      • P payback

        Do the databinding only the first time when page loads. If Not Page.IsPostBack Then DataBindings End IF

        H Offline
        H Offline
        Harikrk
        wrote on last edited by
        #3

        i have done like that only. but still its not working. Its working in locally. But fails when uploaded to server. is there anything to set in the server for this?

        S 1 Reply Last reply
        0
        • H Harikrk

          i have done like that only. but still its not working. Its working in locally. But fails when uploaded to server. is there anything to set in the server for this?

          S Offline
          S Offline
          Sylvester george
          wrote on last edited by
          #4

          can you paste the code snippet here?

          Regards, Sylvester G Senior Software Engineer Xoriant Solutions

          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