Calendar Picker

javascript Thailand
  • 12 years ago

    I'm using a calendar picker (web form), in a standard page, it is functioning well, but when I add a MasterPageFile in the page, the calendar form is not giving its value and not closing. My idea here is that the form with the MasterPageFile is not recognized. What will be my script to do that? 

        protected void Change_Date(object sender, EventArgs e)
        {
            if (Request.QueryString["textbox"] != "")
            {
                Type t = this.GetType();
                string strScript =
                    "<script>window.opener.document.forms(0)." +
                    Request.QueryString["textbox"].ToString() + ".value = '" +
                    calForm.SelectedDate.ToString("MM/dd/yyyy") +
                    "';self.close()" +
                    "</" + "script>";
                    ClientScript.RegisterClientScriptBlock(t, "Calendar_ChangeDate", strScript);
            }
        }

    Maybe my idea is wrong... What is the correct way?

     Thanks in advance... Smiley Face

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Brevity is the soul of wit” - Shakespeare