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. get bind Data only in postback

get bind Data only in postback

Scheduled Pinned Locked Moved ASP.NET
databasetutorialquestion
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.
  • A Offline
    A Offline
    Abdul Rahman Hamidy
    wrote on last edited by
    #1

    Dear All, I am doing a scienero where I have dropdownList which is binded to datasource. I want that based on selectedIndex it should do postback only once. as for example If the new SelectedIndex is 1 then it sould do a postback retreive all data from datasource based on selectedIndex. for the 2nd time If I select index 1 then It should not do postback but I want to store items in client side as the first index is selected at some var. and then every time new index is selected it should do postback then save binded items at some var. any ideas?

    Abdul Rahaman Hamidy Database Developer Kabul, Afghanistan

    B 1 Reply Last reply
    0
    • A Abdul Rahman Hamidy

      Dear All, I am doing a scienero where I have dropdownList which is binded to datasource. I want that based on selectedIndex it should do postback only once. as for example If the new SelectedIndex is 1 then it sould do a postback retreive all data from datasource based on selectedIndex. for the 2nd time If I select index 1 then It should not do postback but I want to store items in client side as the first index is selected at some var. and then every time new index is selected it should do postback then save binded items at some var. any ideas?

      Abdul Rahaman Hamidy Database Developer Kabul, Afghanistan

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

      tgis is very simple.Did you try something? Dropdown's selectedindexchanged event is called only you one change the index if selects the same again and again then it is not callled and there is no postback occurs in this scenario.

      Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

      A 1 Reply Last reply
      0
      • B Brij

        tgis is very simple.Did you try something? Dropdown's selectedindexchanged event is called only you one change the index if selects the same again and again then it is not callled and there is no postback occurs in this scenario.

        Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

        A Offline
        A Offline
        Abdul Rahman Hamidy
        wrote on last edited by
        #3

        thanks for the reply, In fact you are true, but what happens when you first select Index 1 then index 2 then again index 1, I am sure I will do a postback which I dont wanted to do. I would like to store it at some client side variable. any ideas?

        Abdul Rahaman Hamidy Database Developer Kabul, Afghanistan

        N 1 Reply Last reply
        0
        • A Abdul Rahman Hamidy

          thanks for the reply, In fact you are true, but what happens when you first select Index 1 then index 2 then again index 1, I am sure I will do a postback which I dont wanted to do. I would like to store it at some client side variable. any ideas?

          Abdul Rahaman Hamidy Database Developer Kabul, Afghanistan

          N Offline
          N Offline
          nish111
          wrote on last edited by
          #4

          When changing the selected Index, fire a javascript function which check whether the selected index is in the list of values stored in hidden variables if it is return false from the Javascript Method.

          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