Popup calendar



I am trying to create a popup calender so when a user click on a image on
the main form, a calender will then popup, the user will select a date and
the date will then be passed back to the main form and populate a textbox. it
works fine. but when i use it within a table cell everything worked properly
except populating the textbox with the selected date?? any suggestions will
be highly appreciated.

here's the code which popups the calendar:
<asp:textbox id=txtDate runat="server" ForeColor="Black" Width="88px">
href="javascript:;"><IMG src="images/SmallCalendar.gif" border="0">


and here's the code for the selection change:

Private Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Calendar1.SelectionChanged
Dim strjscript As String = "<script language=""javascript"">"
strjscript &= "window.opener." & _
HttpContext.Current.Request.QueryString("formname") & ".value
= '" & _
Calendar1.SelectedDate & "';window.close();"
strjscript = strjscript & "</scr" & "ipt>"
Literal1.Text = strjscript
End Sub


I found out the cause of my problem but i really don't know how to fix it.
The thing is I am using Master Page for all my pages ( Visual Studio 2005 ).
I tried it without the Masterpage it works fine. But when i tried it using
master page it didn't work. any help will be highly appreciated

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question