querystring. We manage to display the selected date from the calendar in a
Lable like this :
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
lblDate.Text = Calendar1.SelectedDate.ToShortDateString();
}
<asp:Label ID="lblDate" runat="server"></asp:Label
What we are trying to accomplish is to pull the above value of the lable
which is "lblDate" to the following link and pass is as a querystring
<a href='default5.aspx?tech=<%# Eval("RESPONS")
%>&today=selected_date'><span style="font-size: 10px">Link
Name</span></a><br /
thnxprotected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
lblDate.Text = Calendar1.SelectedDate.ToShortDateString();
litDate.Text = Calendar1.SelectedDate.ToShortDateString();
}
<asp:Label ID="lblDate" runat="server"></asp:Label>
<a href='default5.aspx?tech=<asp:Literal ID="litDate"
runat="server"/>amp;today=selected_date'><span style="font-size: 10px">Link
Name</span></a><br /
Or just use HyperLink WebControl and fill NavigateUrl property with correct
data.
--
C# Dev
"Chanaka" wrote:
> We are trying to pass the selected date from a .net calendar in a
> querystring. We manage to display the selected date from the calendar in a
> Lable like this :
> protected void Calendar1_SelectionChanged(object sender, EventArgs e)
> {
> lblDate.Text = Calendar1.SelectedDate.ToShortDateString();
> }
> <asp:Label ID="lblDate" runat="server"></asp:Label>
> What we are trying to accomplish is to pull the above value of the lable
> which is "lblDate" to the following link and pass is as a querystring
> <a href='default5.aspx?tech=<%# Eval("RESPONS")
> %>&today=selected_date'><span style="font-size: 10px">Link
> Name</span></a><br />
> thnx
>
>
>
0 comments:
Post a Comment