| Author: Gaurav Agrawal 03 Nov 2008 | Member Level: Diamond | Rating:   Points: 3 |
in first page by where u r calling popup window
on page load hlnk_cal.NavigateUrl = "javascript:calendar_window=window.open('calendar.aspx?formname=" + Form.Name.ToString() + "." + txt_date.ClientID.ToString() + "','calendar_window','width=250,height=225');calendar_window.focus()";
in my popup window
aspx code <body> <form id="form1" runat="server"> <asp:Calendar ID="cal" runat="server" OnSelectionChanged="cal_SelectionChanged" CssClass="textbox"> </asp:Calendar> <asp:Literal ID="Literal1" runat="server"></asp:Literal> </form> </body>
and .cs code public void cal_SelectionChanged(object sender, EventArgs e) { string strjscript = "<script language='javascript'>"; strjscript += "window.opener.document." + Request.QueryString["formname"] + ".value = '" + cal.SelectedDate.Date.ToShortDateString() + "';window.close();"; strjscript = strjscript + "</script" + ">" ; Literal1.Text = strjscript; }
GA
Thanks & Regards,
Gaurav Agrawal Sr.Software Engineer gaur1982@yahoo.com 09829373514
|
| Author: Anand 03 Nov 2008 | Member Level: Bronze | Rating: Points: 1 |
In first page on button click am calling the javascript
|
| Author: Anand 03 Nov 2008 | Member Level: Bronze | Rating:  Points: 2 |
thanks Gaurav.. it works fine, it possible to do the same without using hyperlink.. Any other method? plz..
|