AJAX UpdatePanel not passing out the value
-
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
-
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
You must add the triggers after the content template in updatepanel. God is always with you.
-
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
You must add triggers after content template in the update panel. < asp:PostBackTrigger ControlID="ddTask" /> God is always with you.
-
You must add triggers after content template in the update panel. < asp:PostBackTrigger ControlID="ddTask" /> God is always with you.
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