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


Top 5 Contributors of the Month
david stephan

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.

www.abc.com?id=1&Cat2

How can i achieve that?

Data is coming from database.

Any help would be appreciated.

I am using ASP.Net with c#.

Regards
Ramesh

Responses
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">
<Columns>
<asp:TemplateColumn HeaderText="Order">
<ItemTemplate>
<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"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:GridView>



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

Hi..

Try like this..


<asp:TemplateField HeaderText="Edit">
<ItemTemplate>
<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>
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>

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

<asp:GridView id="GridView1" AutoGenerateColumns="False" runat="server">
<Columns>
<asp:TemplateColumn HeaderText="Product">
<ItemTemplate>
<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"/>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
</asp:GridView>



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
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

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