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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. dropdown data lost on post back of contentpage

dropdown data lost on post back of contentpage

Scheduled Pinned Locked Moved ASP.NET
help
4 Posts 4 Posters 1 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.
  • S Offline
    S Offline
    S Aijaz
    wrote on last edited by
    #1

    i have a content page with some masterpage. content page is having a dropdownlist that is bound with datasource on (!page.ispostBack). when page get posted back dropdownlist data losts. if i bound it again on page load then indexchanged event is always fired for fist item. any help will be appreciated

    C N E 3 Replies Last reply
    0
    • S S Aijaz

      i have a content page with some masterpage. content page is having a dropdownlist that is bound with datasource on (!page.ispostBack). when page get posted back dropdownlist data losts. if i bound it again on page load then indexchanged event is always fired for fist item. any help will be appreciated

      C Offline
      C Offline
      Chetan visodiya
      wrote on last edited by
      #2

      First find the asp:Content for dropdownlist and then check that EnableViewState property of the asp:Content is true. Also check that EnableViewState property of ContentPlaceHolder in master page. if its false then set true.

      1 Reply Last reply
      0
      • S S Aijaz

        i have a content page with some masterpage. content page is having a dropdownlist that is bound with datasource on (!page.ispostBack). when page get posted back dropdownlist data losts. if i bound it again on page load then indexchanged event is always fired for fist item. any help will be appreciated

        N Offline
        N Offline
        Niladri_Biswas
        wrote on last edited by
        #3

        Set the AutoPostBack="True" of dropdown :)

        Niladri Biswas

        1 Reply Last reply
        0
        • S S Aijaz

          i have a content page with some masterpage. content page is having a dropdownlist that is bound with datasource on (!page.ispostBack). when page get posted back dropdownlist data losts. if i bound it again on page load then indexchanged event is always fired for fist item. any help will be appreciated

          E Offline
          E Offline
          Ennis Ray Lynch Jr
          wrote on last edited by
          #4

          I like to use the Init event to load data instead of the page load event, it helps to solve this kind of problem.

          Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

          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