Link to home
Start Free TrialLog in
Avatar of Senz79
Senz79Flag for India

asked on

Pass Date Value in Querystring

Hello
I have a datagrid with a hyperlink column and i want to pass multiple value in query string. One of the value is ID of type int and anather value is of DateTime.

Now when i alone use the ID field i am able to create the hyperlink column, but when i include the datetime feild the hyperling does not work .

Please help
senz
<asp:HyperLinkField DataNavigateUrlFields="SnhID,SnhInsertedAt" 
                                        DataNavigateUrlFormatString="MessageDetails.aspx?SnhID={0}&SnhInsertedAt={1}" 
                                        DataTextField="SnhID"  HeaderText="Message ID" />

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of darshan_derasari
darshan_derasari
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Senz79

ASKER

I am Able to get the date but how to attach anather value

 

<asp:TemplateField HeaderText="DateTime"> 
<ItemTemplate> 
<asp:HyperLink runat="server" ID="EvtDate" NavigateUrl='<%# "MessageDetails.aspx?EventDate=" + Server.UrlEncode(Eval("snhInsertedAt").ToString()) %>' Text='<%# Eval("snhInsertedAt") %>' /> 
</ItemTemplate> 
</asp:TemplateField>

Open in new window

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial