veasnamuch 0 Newbie Poster

Hello,

I have a problem on ASP.NET webpage for data input form. My form contains a TEXTFIELD(txtDateEntry) and a Dropdownlist (ddlRegistration). dllRegistration should be populate its data base on date in txtDateEntry. I have added an image(imgCalendar) next to textfield(txtDateEntry) and attach javascript to load a Popup Calenday.

In my page load(Register.aspx) I have added the script as below:

this.imgCalendar.Attributes["onclick"] ="javascript:window.open('../CalendarPopup.aspx?textbox=txtDateEntry','cal','width=250,height=225,left=270,top=180')";

 

and on CalendarPopup.aspx:

   protected void calDate_SelectionChanged(object sender, System.EventArgs e)
{

string strScript = "<script language='javascript'>window.opener.document.forms(0)." + control.Value + ".value = '";
strScript += calDate.SelectedDate.ToShortDateString();
strScript += "';self.close()";
strScript += "</" + "script>";
ClientScript.RegisterClientScriptBlock(this.GetType(),"anything", strScript);

}

My purpose now is that when user click on the calender and select a date, the dropdown list ddlRegistration will initial its data base on the date where calender is being selected.

How could I do to reach this requirement?

Your help are very impotrant to my succed.

Best regards,

Veasna