R
R.A.M.
Hello,
Could you help me plase? I need to set Text property of TextBox when
second page is displayed and active. On first page I have:
Birth date: <asp:TextBox ID="BirthDate" runat="server"
ValidationGroup="BirthDate" />
...
Session["BirthDate"] = BirthDate;
On second page I have:
<asp:Calendar ID="Calendar" runat="server"
OnSelectionChanged="Calendar_SelectionChanged" />
...
protected void Calendar_SelectionChanged(object sender,
EventArgs e)
{
if (Session["BirthDate"] != null)
((TextBox) Session["BirthDate"]).Text =
Calendar.SelectedDate.ToString().Substring(0, 10);
}
But it doesn't work - no visible result.
Could you tell me plase what's wrong? Thank you very much!
/RAM/
Could you help me plase? I need to set Text property of TextBox when
second page is displayed and active. On first page I have:
Birth date: <asp:TextBox ID="BirthDate" runat="server"
ValidationGroup="BirthDate" />
...
Session["BirthDate"] = BirthDate;
On second page I have:
<asp:Calendar ID="Calendar" runat="server"
OnSelectionChanged="Calendar_SelectionChanged" />
...
protected void Calendar_SelectionChanged(object sender,
EventArgs e)
{
if (Session["BirthDate"] != null)
((TextBox) Session["BirthDate"]).Text =
Calendar.SelectedDate.ToString().Substring(0, 10);
}
But it doesn't work - no visible result.
Could you tell me plase what's wrong? Thank you very much!
/RAM/