<p>I wanted to pass <code>calendar1.Selecteddate</code> in a <code>query string</code> from <code>gridview</code> in one page to another <code>gridview</code> (I have written <code>sqlquery</code> in that <code>gridview</code>) in another page. As seen in the below code I tried passing it but this did not work. Can anyone tell me how to pass the selected date from <code>calendar</code> in <code>query string</code></p>

<pre><code>      &lt;asp:HyperLinkField DataNavigateUrlFields="LocalIP" 
                DataNavigateUrlFormatString="DailyResults.aspx?
           Terms={0}&amp;column=LocalIP&amp;    
               startdate=Calendar1.SelectedDate.Date.Date.ToShortDateString()
                DataTextField="LocalIP" HeaderText="User" /&gt;
</code></pre>

In the example you've provided it would treat that calendar part of the string as a literal and pass the exact value you have typed.
In order to obtain the data using you would need to do something similar to:
```
```
<asp:HyperLinkField DataNavigateUrlFormatString="<%=GetSelectedDate()%>....
```
```
where this is a method on the code behind class (or you could use a property) that creates the string you intend, including the {0} placeholder for the LocalIP bound data field.