Check out this article,
[url]http://www.microsoft.com/india/msdn/articles/PopupCalendarinASP.aspx[/url]

--
Saravana
Microsoft India Community Star,
MCAD,SE,SD,DBA.


"utpal" <utpal_min@yahoo.com> wrote in message
news:010a01c34712$d8c57af0$a501280a@phx.gbl...
> Hi All ,
> I have a problem with reading a Clicked Date from a Pop-
> Up Calendar.
> I have the button and a Text Box in a WebForm.Clicking
> this button
> pops up a calendar(which is a separate WebForm).
> Selecting a Date on the WebForm transfers the selected
> Date to the
> Text Box(on the Other WebForm).
>
> In the "Code Behind" for the Calendar WebForm I have the
> following Code::
>
> Private Sub Page_Load(ByVal sender As System.Object,
> ByVal e As System.EventArgs) Handles MyBase.Load
> 'Put user code to initialize the page here
> 'THE FOLLOWING LINE GIVES ME AN ERROR -- IT SAYS THAT
> 'System.NullReferenceException: Object reference not set
> to an instance of an object.
>
> Hidden1.Value = Request.QueryString
> ("textbox").ToString()
>
> End Sub
>
>
> Public Sub Calendar1_SelectionChanged(ByVal sender As
> Object, ByVal e As System.EventArgs)
>
> Dim strScript As String
> = "<script>window.opener.document.forms(0)." +
> Hidden1.Value + ".value = '"
> strScript += Calendar1.SelectedDate.ToString
> ("MM/dd/yyyy")
> strScript += "';self.close()"
> strScript += "</" + "script>"
> RegisterClientScriptBlock("anything", strScript)
>
> End Sub
>
>
> iN THE paGE WHERE THE BUTTON IS CLICKED I HAVE THE
> FOLLOWING CODE IN THE html
> PART
>
> <INPUT name="textBox1" type="text" id="textbox1"> <INPUT
> type="button" runat="server"
> onclick="javascript:cal=window.open('Calender.aspx ?
> textbox =
> textbox1','cal','width=800,height=800' );cal.setfocus()"
> value="Button" />
>
> nOW WHAT IS THE WAY OUT?
> HELP IS GREATLY APPRECIATED.tHANKS ,
>