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. Postback in DropDown List Asp.Net 1.1

Postback in DropDown List Asp.Net 1.1

Scheduled Pinned Locked Moved ASP.NET
helpcsharpasp-netsysadminquestion
4 Posts 2 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.
  • P Offline
    P Offline
    Phanindra Kumar
    wrote on last edited by
    #1

    Hi, I have a dropdown list with "AutoPostBack=true" in my Asp.Net 1.1 page for which i added a client side method for the client event "onchange" using "Attributes.Add". In this client method I am doing some validation. If the validation fails an error message will be shown without causing postback. This part is work fine with me. If the validation check is OK then I am returning true in client method which causes postback and executes sever side event "OnSelectedIndexChanged" . Now, the problem is that : after the validation check my server side event is not firing up eventhough I placed "return true;" in my client method. Just the postback is not happening Can any one help me? Thanks in Advance

    Phanindra...

    N 1 Reply Last reply
    0
    • P Phanindra Kumar

      Hi, I have a dropdown list with "AutoPostBack=true" in my Asp.Net 1.1 page for which i added a client side method for the client event "onchange" using "Attributes.Add". In this client method I am doing some validation. If the validation fails an error message will be shown without causing postback. This part is work fine with me. If the validation check is OK then I am returning true in client method which causes postback and executes sever side event "OnSelectedIndexChanged" . Now, the problem is that : after the validation check my server side event is not firing up eventhough I placed "return true;" in my client method. Just the postback is not happening Can any one help me? Thanks in Advance

      Phanindra...

      N Offline
      N Offline
      NanaAM
      wrote on last edited by
      #2

      before return true add following code- __doPostBack('dropdownlistcontrolname',''); -- modified at 5:31 Tuesday 20th February, 2007 'dropdownlistcontrolname' - is the id of your dropdownlistbox

      Nana

      P 1 Reply Last reply
      0
      • N NanaAM

        before return true add following code- __doPostBack('dropdownlistcontrolname',''); -- modified at 5:31 Tuesday 20th February, 2007 'dropdownlistcontrolname' - is the id of your dropdownlistbox

        Nana

        P Offline
        P Offline
        Phanindra Kumar
        wrote on last edited by
        #3

        Thank You so much. Its working now. Thanks a lot:):laugh:

        Phanindra...

        N 1 Reply Last reply
        0
        • P Phanindra Kumar

          Thank You so much. Its working now. Thanks a lot:):laugh:

          Phanindra...

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

          :) No probs

          Nana

          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