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. AJAX UpdatePanel not passing out the value

AJAX UpdatePanel not passing out the value

Scheduled Pinned Locked Moved ASP.NET
questionhelp
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.
  • J Offline
    J Offline
    J Liang
    wrote on last edited by
    #1

    Hi, I'm having some problem with AJAX, hope to get some work around from you guys here. I have 2 drop down box and 1 GridView - ddProject, ddTask, GridView1 ddTask is in the UpdatePanel1 GridView1 is in the UpdatePanel2 OnSelectedIndexChanged on ddProject will fill up ddTask which works fine. My GridView1 will present the data base on the value selected in ddTask, the problem is the where clause in GridView1's Control does not have the ddTask for me to choose. I put a textbox outside all UpdatePanel and name it txtTask so that GridView1 can refer to this for displaying data, and do a OnSelectedIndexChanged on ddTask but txtTask is not filled with anything when I select from ddTask. The question is, how do I bring out data from UpdatePanel to controls that are outside the UpdatePanel. Thanks in advance. J Liang

    S 2 Replies Last reply
    0
    • J J Liang

      Hi, I'm having some problem with AJAX, hope to get some work around from you guys here. I have 2 drop down box and 1 GridView - ddProject, ddTask, GridView1 ddTask is in the UpdatePanel1 GridView1 is in the UpdatePanel2 OnSelectedIndexChanged on ddProject will fill up ddTask which works fine. My GridView1 will present the data base on the value selected in ddTask, the problem is the where clause in GridView1's Control does not have the ddTask for me to choose. I put a textbox outside all UpdatePanel and name it txtTask so that GridView1 can refer to this for displaying data, and do a OnSelectedIndexChanged on ddTask but txtTask is not filled with anything when I select from ddTask. The question is, how do I bring out data from UpdatePanel to controls that are outside the UpdatePanel. Thanks in advance. J Liang

      S Offline
      S Offline
      Sarani Ravindran
      wrote on last edited by
      #2

      You must add the triggers after the content template in updatepanel.   God is always with you.

      1 Reply Last reply
      0
      • J J Liang

        Hi, I'm having some problem with AJAX, hope to get some work around from you guys here. I have 2 drop down box and 1 GridView - ddProject, ddTask, GridView1 ddTask is in the UpdatePanel1 GridView1 is in the UpdatePanel2 OnSelectedIndexChanged on ddProject will fill up ddTask which works fine. My GridView1 will present the data base on the value selected in ddTask, the problem is the where clause in GridView1's Control does not have the ddTask for me to choose. I put a textbox outside all UpdatePanel and name it txtTask so that GridView1 can refer to this for displaying data, and do a OnSelectedIndexChanged on ddTask but txtTask is not filled with anything when I select from ddTask. The question is, how do I bring out data from UpdatePanel to controls that are outside the UpdatePanel. Thanks in advance. J Liang

        S Offline
        S Offline
        Sarani Ravindran
        wrote on last edited by
        #3

        You must add triggers after content template in the update panel. < asp:PostBackTrigger ControlID="ddTask" /> God is always with you.

        J 1 Reply Last reply
        0
        • S Sarani Ravindran

          You must add triggers after content template in the update panel. < asp:PostBackTrigger ControlID="ddTask" /> God is always with you.

          J Offline
          J Offline
          J Liang
          wrote on last edited by
          #4

          Hey, Thanks man, it works, it actually pass the value out. But I did some changes to it. I put the txtTask into UpdatePanel2 and add AsyncPostBack for ddTask in UpdatePanel2, so when SelectIndexChanged trigger for ddTask, it update txtTask in UpdatePanel2, now my GridView1 in UpdatePanel2 can refer to txtTask with no problem. :) J Liang

          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