Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,


I have a page that contain a textbox and an image control. On clicking on the calender image a child window open that contain a calender.But the problem is, on the selection of date in the child window i can't get the date into the textbox of parent page. How could i get it plz explain it with the sample code.


Thanks!!!!
Posted

 
Share this answer
 
The best way is to open the child withow from javascript, so that you don;t need to redirect to another page.

Alternative suggestion, when you select something in next(child) page, get the data and pass it to the 1st page through
querystring
Forms Request
--cookiie
--session
The last two (cookie/session) is not needeed in this situation.
that means you need to persist your data in 2nd page.

In the 1st page check the querystring value and if you find a value set it in the text box.



Hope this helps.
cheers
 
Share this answer
 
Comments
Tisha Ahuja 22-Aug-12 6:33am    
My child window is working properly but i don't want to get it through cookie,session and querystring.Please suggest something else.

Thanks!!
Sandip.Nascar 22-Aug-12 6:39am    
Your child window in in aspx. Right?
If yes, when you moved to child window, you lost the 1st page state. You have no choice rather than to persist data. Have you tried Request.Forms

http://msdn.microsoft.com/en-us/library/ms525985(v=vs.90).aspx
I think the best way to pass it will be in form of session variable. Since you are opening the child window as a popup, IMHO, i cant think of any other way this can be done.
 
Share this answer
 
I might help u!!!

TargetControlID="txtDOB"


XML
<asp:TextBox ID="txtDOB" runat="server"></asp:TextBox>
<cc1:CalendarExtender ID="txtDOB_CalendarExtender" runat="server"
    Enabled="True" Format="dd/MM/yyyy" TargetControlID="txtDOB">
</cc1:CalendarExtender>



Thanx
~~Karthik.J~~
 
Share this answer
 
Comments
Tisha Ahuja 22-Aug-12 5:57am    
I am not using calender extender control in my page i take an image control . On clicking on that image a child window open open but i don't know how to get a selected date in the textbox.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900