Click here to Skip to main content
15,893,668 members

Try the below code snippet:
C#
<a href="<%# "PageToTransfer.aspx?date=" + Eval("YourDBColumnName") %>" />

OR
C#
<a href="<%# string.Format("PageToTransfer.aspx?date={0}", Eval("YourDBColumnName")) %>" />



--Amy
 
Share this answer
 
Hi,

Your requirement is not clear. but what I understand is that you want to put an href in your grid view which will have a query string and that you want to make a query string which will have the first name as a parameter.

See the below code it might give you some Idea.
XML
<asp:GridView ID="GridView1" runat="server" EnableModelValidation="True">
    <Columns>
        <asp:BoundField DataField="FirstName" HtmlEncode="False" DataFormatString="<a target='_blank' href='Test.aspx?firstname={0}'>Link Text Goes here</a>" />
    </Columns>
</asp:GridView>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900