.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Lee Hnetinka

Home >> Forum >> ADO.Net >> Post New QuestionBookmark and Share Subscribe to Forum

how to pass two parameter in querystring in gridview hyperlink column

Posted By: Ramesh     Posted Date: February 03, 2009    Points:2   Category :ADO.Net
How to pass tow parameter in Querystring in Gridview Hyperlink column?
I have A template column inside gridview and i want to pass Two Parameter using Querystring for eg.


How can i achieve that?

Data is coming from database.

Any help would be appreciated.

I am using ASP.Net with c#.


Author: Rahul             
Posted Date: February 05, 2009     Points: 5   

Hi try like this to pass multiple parameter in

<asp:GridView id="GridView1" AutoGenerateColumns="False" runat="server">
<asp:TemplateColumn HeaderText="Order">
<asp:Hyperlink runat="server" Text=''<%#DataBinder.Eval(Container.DataItem,"Order ID")%>'' NavigateUrl=''<%# "page.aspx?Orderid=" + DataBinder.Eval(Container.DataItem,"Orderid") + "&ProductID=" + DataBinder.Eval(Container.DataItem,"ProductID")%>'' ID="Hyperlink1" NAME="Hyperlink1"/>

Author: Athira Sreejith             
Posted Date: February 05, 2009     Points: 5   


Try like this..

<asp:TemplateField HeaderText="Edit">
<asp:HyperLink ID="hypEdit" runat="server" NavigateUrl='<%# Eval("Id", "~/prospectsfirm.aspx?mode=Edit&&PFid={0}") %>'
Text="Edit Firm" ImageUrl="~/Images/ico-edit.gif"></asp:HyperLink>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />

Author: Nabin             
Posted Date: August 25, 2009     Points: 5   

<asp:GridView id="GridView1" AutoGenerateColumns="False" runat="server">
<asp:TemplateColumn HeaderText="Product">
<asp:Hyperlink runat="server" Text=''<%#DataBinder.Eval(Container.DataItem,"Product name")%>'' NavigateUrl=''<%# "pagename.aspx?id=" + DataBinder.Eval(Container.DataItem,"id") + "&CatID=" + DataBinder.Eval(Container.DataItem,"catid")%>'' ID="hledit"/>

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend