.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 >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to pass multiple Querystring in datagrid field

Posted By: Ramesh     Posted Date: September 03, 2009    Points:2   Category :ASP.Net
Hi,
I want to pass multiple Querystring in datagrid hyperlink field. How can i do that?

for eg i need to pass

www.axyz.com/home/abc.aspx?id=1&Val=4

using the hyperlink control inside template column that is indise GridView in asp.net.

Thanks
Ramesh

Responses
Author: Nabin             
Posted Date: September 04, 2009     Points: 5   

hi,Ramesh
Pass the values like this in the hyperlink field in the gridview

<asp:HyperLinkField HeaderText="View Details" DataNavigateUrlFields="subject,query" DataNavigateUrlFormatString = "~/Pages/default.aspx?UserName={0}&GameTitle={1}" Text="View" />



thanks
Nabin

Author: Lakhan Pal Garg             
Posted Date: September 12, 2009     Points: 5   

Hi Ramesh-
Use can also use like this:

<asp:HyperLinkField HeaderText="View Details" NavigateUrl='<%# "~/Pages/default.aspx?UserName"+Eval("FirstColumn").ToString()+"&GameTitle="+Eval("SecondColumn").ToString()' Text="View" />

Thanks & Regards
Lakhan Pal Garg



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