i have a button inside each accordion conteNT template, on clicking of which a modal popup extender would appear..
In this pop up, i would have dynamically created labels and textboxes, which would be created and displayed during the Accordion_ItemCommand event.
now, on clicking the save button from inside the pop up, i need to get the text which the user types inside the textboxes within the pop-up,
as i need those text-values in my program.
But the problem is that everytime i click on the save button, the page loads again, and the dynamically created textboxes and everything are lost.
After googling , i found out that one way out is to dynamically create them in Init event..
But in my case, i can dynamically create them only after the accordion is created.., and hence the dynamic controls would be created in accordion-itemcommand event..
Any suggestions on how to get the text typed by the user from the textbox which is inside modal popup?
Basically i would need to save the SESSION or VIEWSTATE of the dynamically created controls, i guess.
But for some reason i am not able to locate the exact dynamically created controls, or save their value, i dont know.
In a mess.
Any help would be grrreat!! (with the code please :P )
saraholiver
None
0 Points
10 Posts
get the text typed by the user from modal popup extender.
May 01, 2012 06:41 PM|LINK
i have a button inside each accordion conteNT template, on clicking of which a modal popup extender would appear..
In this pop up, i would have dynamically created labels and textboxes, which would be created and displayed during the Accordion_ItemCommand event.
now, on clicking the save button from inside the pop up, i need to get the text which the user types inside the textboxes within the pop-up,
as i need those text-values in my program.
But the problem is that everytime i click on the save button, the page loads again, and the dynamically created textboxes and everything are lost.
After googling , i found out that one way out is to dynamically create them in Init event..
But in my case, i can dynamically create them only after the accordion is created.., and hence the dynamic controls would be created in accordion-itemcommand event..
Any suggestions on how to get the text typed by the user from the textbox which is inside modal popup?
Basically i would need to save the SESSION or VIEWSTATE of the dynamically created controls, i guess.
But for some reason i am not able to locate the exact dynamically created controls, or save their value, i dont know.
In a mess.
Any help would be grrreat!! (with the code please :P )
saraholiver
None
0 Points
10 Posts
Re: get the text typed by the user from modal popup extender.
May 01, 2012 06:45 PM|LINK
I guesss i am looking for some miracle, which would keep saving watever is typed inside the textbox in a variable.. but i dunno how to do that
from code behind, after the popup is displayed.
So, when i click save, though the page loads again, i would still access the value of the static variable.
Help..
chetan.sarod...
All-Star
65729 Points
11138 Posts
Re: get the text typed by the user from modal popup extender.
May 03, 2012 03:25 AM|LINK
http://forums.asp.net/t/1402974.aspx/1
http://forums.asp.net/t/1231155.aspx/1
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Song-Tian - ...
All-Star
43697 Points
4304 Posts
Microsoft
Re: get the text typed by the user from modal popup extender.
May 03, 2012 06:43 AM|LINK
Hi,
Why you not handle that in button save click event?
Any more question, please feel free to reply.
Feedback to us
Develop and promote your apps in Windows Store
saraholiver
None
0 Points
10 Posts
Re: get the text typed by the user from modal popup extender.
May 03, 2012 05:34 PM|LINK
that's because, before the button save click event, the pageload event is called again, and all the dynamic created textbox controls are lost.
so, i cant access the text in button save click event..
Song-Tian - ...
All-Star
43697 Points
4304 Posts
Microsoft
Re: get the text typed by the user from modal popup extender.
May 04, 2012 08:26 AM|LINK
Hi,
Do you try the clientside onclick event? That will don't fire postback.
Feedback to us
Develop and promote your apps in Windows Store
saraholiver
None
0 Points
10 Posts
Re: get the text typed by the user from modal popup extender.
May 07, 2012 07:01 AM|LINK
with onclientclick event, how will i access the usercontroll's text..
that's not possible no?
with onclient click, i will just have clientside javascript..
i cannot use the usercontrols, their text or save it..
can you help me with session and viewstate saving of the text typed by user inside usercontrols.
Song-Tian - ...
All-Star
43697 Points
4304 Posts
Microsoft
Re: get the text typed by the user from modal popup extender.
May 07, 2012 08:20 AM|LINK
Hi,
Yes, you could access server side with javascript. For example, you could use pagemethods or web service and so on.
For pagemethods, please refer to: http://blogs.microsoft.co.il/blogs/gilf/archive/2008/10/04/asp-net-ajax-pagemethods.aspx.
For javascript call webservice, please refer to: http://msdn.microsoft.com/en-us/library/bb398995(v=VS.90).aspx.
Feedback to us
Develop and promote your apps in Windows Store