Problem with Ajax calendar control...............
-
-
Hi, I am picking the date from Ajax popupcalendar control and putting in textbox.....I want to access that value in next page...but I am not able to access the text box value(date) into next page when I click the button....... Thanking you Mcmilan.
Hi, Store it in a Session and access it. Storing Session["MyDate"] = txtDate.Text; Accessing if(Session["MyDate"]!= null) { txtNext.Text = Session["MyDate"].ToString(); } Key Note: Session is per user, so that this will be there with in the site as long as you are using the site and it can be accessed from any page. Thx, Gayani
-
Hi, I am picking the date from Ajax popupcalendar control and putting in textbox.....I want to access that value in next page...but I am not able to access the text box value(date) into next page when I click the button....... Thanking you Mcmilan.
-
Hi, Store it in a Session and access it. Storing Session["MyDate"] = txtDate.Text; Accessing if(Session["MyDate"]!= null) { txtNext.Text = Session["MyDate"].ToString(); } Key Note: Session is per user, so that this will be there with in the site as long as you are using the site and it can be accessed from any page. Thx, Gayani
-
Thank you Gayani, Thanks for your response but it is not working incase of ajax calendar control......from past one week I am trying with this but not working..... Thanking you Mcmilan
Hi Mcmilan, Shall we see whether the Ajax Calendar control passes the selected date to the Target Control? Just try this and see..... Here im going to use two pages. Page one will have a Calender control, text box and a button. The date you select from the calendar control will be displayed in the text box and the button will redirect you to the page two. [SamplePageOne.aspx] <asp:ScriptManager ID="smTestSample" runat="server"> </asp:ScriptManager> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <cc1:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1"> </cc1:CalendarExtender> <asp:Button ID="Button1" runat="server" Text="Go to Next Page" OnClick="Button1_Click" /> [SamplePageOne.aspx.cs] protected void Button1_Click(object sender, EventArgs e) { Session["MyDate"] = TextBox1.Text; Response.Redirect("SamplePageTwo.aspx"); } In the page two I will check if the session is null, and if not I wil write the value to the second page. [SamplePageTwo.aspx.cs] protected void Page_Load(object sender, EventArgs e) { if (Session["MyDate"] != null) { Response.Write(Session["MyDate"].ToString()); } } Hope it helps you, Thanks, Gayani