Asp.Net News
Free Tech Magazines
Asp.Net Web Hosting
Suggest Us
Link to Us
Feeds Subscription
Questions & Answers
Tips & Tricks
 How To Pass Multiple QueryString or Parameter in Hyperlink NavigateUrl from GridView?
Posted by Moderator1 on  12/31/2009 4:27:06 AM 12398 Views
The information provided here will help you to frame more than one QueryString parameter in a HyperLink control placed inside GridView control and also shows you, how to pass multiple QueryString in the HyperLinkField of the GridView control.

1. Passing Multiple QueryStrings From HyperLink Inside GridView TemplateField Section

<asp:HyperLink ID="HyperLink1" runat="server" Text="View Data"
NavigateUrl='<%# String.Format("TestPage.aspx?param1={0}&param2={1}&param3={2}", Eval("Field1"), Eval("Field2"), Eval("Field2")) %>'></asp:HyperLink>

2. Passing Multiple QueryString From HyperLinkField of GridView Control

<asp:HyperLinkField DataNavigateUrlFields="Field1,Field2,Field3" DataNavigateUrlFormatString="TestPage.aspx?param1={0}&param2={1}&param3={2}" Text="View Data" />

Post New Tips/Tricks View all Tips/Tricks

Featured Resources:
Programmers Heaven C# School Book - Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
The ASP.NET 2.0 Anthology: 101 Essential Tips, Tricks & Hacks - Free 156 Page Preview
Learn the most practical features and best approaches for ASP.NET.
100% Free Subscription until Stock lost.View complete list.
Sponsored by