Using a HyperLinkField within a GridView to Pass a Date Value From One Page to Anothe

Hey All,

I’m having a problem passing a date value from a GridView generated hyper link field to another page. Through some searching, I believe I’m using the correct syntax to generate the link, but whenever I try to bind a date to the DataNavigateUrlFields property, it won’t create the hyper link. As I understand GridView, it won’t generate the hyper link if the url is bad.

The method I’m using method does work when passing other fields; it only seems to be choking on the date value. This is the code I’m using, can anyone see what I might be doing wrong?

Thanks in advance.

<asp:HyperLinkField DataTextField="PROCESSING_DATE" 
	DataTextFormatString="{0:d}" HeaderText="Batch Date" 
    DataNavigateUrlFields="PROCESSING_DATE" 
    DataNavigateUrlFormatString="~/myDetailPage.aspx?processingDate={0}" />


<asp:HyperLink>
     HeaderText="Batch Date" 
    DataNavigateUrl =' 
 <&#37;# + "~/myDetailPage.aspx?processingDate=" + Eval("URLFromDBGoesHere", "{0:d}")%> '
    Text='<%# Eval("TextNameFromDBGoes Here", "[{0}]") 
 </asp:HyperLink>


I figured this out. It actually had nothing to do with the syntax, but rather a fundamental flaw in the way the date was being returned from the database. Once this was corrected, the code snippet that I had posted worked correctly. Thank you for your response anyway.