Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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 22-Aug-12 0:42am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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
  Permalink  
Comments
Tisha Ahuja at 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 at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I might help u!!!
 
TargetControlID="txtDOB"
 

<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~~
  Permalink  
Comments
Tisha Ahuja at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 22 Aug 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100