Hi,
I m developing web application in asp.net with c# in which i m having
2 web form.
First web page is connected with masterpage.
Second is not connected with master page
in both webpage i m taking textbox for date
i m using aspx calendar control for taking date it.
Second webpage is running fine, which is not connected with masterpage.
But in first i m getting problem ,for taking date from aspx calender control.
in this case calender is shown in image, click but when i select date from calender, i m not getting date in textbox
My aspx code is show below:
<script language="javascript">
function PopupPicker(ctl) {
var PopupWindow = null;
PopupWindow = window.open('DatePicker.aspx?ctl=' + ctl, 'zx', 'width=250,height=250');
PopupWindow.focus();
}
</script>
<asp:TextBox ID="txtDate" runat="server"><img src="images/btnimg.jpg"
style="margin-top:3px;width:30px;height:13px; cursor:hand;" alt=""
önclick="PopupPicker('txtDate')" />
and datepicker.aspx code is shown below
<script language="javascript">
function SetDate(dateValue, ctl) {
thisForm = window.opener.document.forms[0].elements[ctl].value = dateValue;
self.close();
}
</script>
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
string ctrl = Request.QueryString["ctl"];
HyperLink hpl = new HyperLink();
hpl.Text = ((LiteralControl)e.Cell.Controls[0]).Text;
hpl.NavigateUrl = "javascript:SetDate('" + e.Day.Date.ToShortDateString() + "','" + ctrl + "');";
e.Cell.Controls.Clear();
e.Cell.Controls.Add(hpl);
}
can anyone help me pls