Pass the selected date from a calendar in a querystring - .net 2005 b2

C

Chanaka

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")
%>&amp;today=selected_date'><span style="font-size: 10px">Link
Name</span></a><br />

thnx
 
G

Guest

protected 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,816
Latest member
SapanaCarpetStudio

Latest Threads

Top