Geeks With Blogs

@azamsharp
  • azamsharp The WWDC app says that there are new videos but there is nothing under videos!!! about 528 days ago
  • azamsharp Can I post my opinion on iOS 7 Beta or is it under NDA or something? about 528 days ago
  • azamsharp iOS 7 BETA installed successfully! about 528 days ago
  • azamsharp iOS 7 BETA installed! Now restoring! I am on NET10 which uses AT&T network. Hopefully 3G will still work! Lets c.. about 528 days ago
  • azamsharp The missing of button borders in Xcode 5 makes it hard to determine the clickable area. about 529 days ago
  • azamsharp I might wait for iOS to be released before I can put it on my device! Don't want a bricked or unstable device! about 529 days ago
  • azamsharp Android has many features that no one uses, number of versions that no one upgrades to and thousands of apps that no one pays for. about 529 days ago
  • azamsharp Maybe it is just me but the new iOS 7 UI looks like Windows Phone 8 UI! #maybeIamCrazy about 529 days ago
  • azamsharp Anyone using H20 network upgraded to iOS 7 BETA Keep me updated if you face any problems. about 529 days ago
  • azamsharp @merowing_ You already downloaded it! I cannot even load the developer's website! :( about 529 days ago

AzamSharp Some day I will know everything. I hope that day never comes.

You can easily pass multiple fields in the querystring when using the GridView HyperLinkField column. Take a look at the code below:

<asp:GridView ID="gvCategories" runat="server" >

<Columns>

<asp:HyperLinkField DataTextField="CategoryName" DataNavigateUrlFields="CategoryID,CategoryName,Description" DataNavigateUrlFormatString="~/Learning.aspx?categoryID={0}&categoryName={1}&description={2}" />

</Columns>

</asp:GridView>

Easy is'nt it!

Posted on Monday, September 18, 2006 11:40 AM | Back to top


Comments on this post: Passing Multiple Fields With GridView HyperLink Column

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
I have two text boxes where the user will enter valid values. I would like to pass the user entered values from text boxes along with data bound column value in the hyperlink. I am running into problems if I try to dynamically set the datanavigateurlstring with the custom values. Even though I declare the field as hyperlinkfield, while compiling, it doesn't show the field as hyperlinkfield. Any idea how can we do that? Thank you very much
Left by Rachel on Sep 19, 2006 5:54 PM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
How can we open a samll popup window with passing the parameters too
Left by Tina on Oct 02, 2006 12:32 PM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
Thanks... i scratched my head for 30 mins and then got this simple solution
Left by Sumant on Oct 03, 2006 3:57 AM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
<asp:GridView ID="gvCategories" runat="server" >

<Columns>

<asp:HyperLinkField DataTextField="CategoryName" DataNavigateUrlFields="CategoryID,CategoryName,Description" DataNavigateUrlFormatString="~/Learning.aspx?categoryID={0}&categoryName={1}&description={2}" />

</Columns>

</asp:GridView>
Left by asdf on Apr 26, 2007 12:13 AM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
&lt;asp:GridView ID=&quot;gvCategories&quot; runat=&quot;server&quot; &gt;

Left by asdf on Apr 26, 2007 12:15 AM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
I need to know that how to pass this parameters to popup windows
Left by Tejas on Jul 21, 2007 10:33 PM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
it's greate, but can i do this with hyperlink control within a grid
Left by Krishna on Oct 04, 2007 3:10 AM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
Hi Krishna,

The HyperlinkColumn will serve as a Hyperlink.

Left by AzamSharp on Oct 25, 2007 2:34 PM

# how to send cookies values from datalist to another page
Requesting Gravatar...
hai,

i have use 2005 platform in asp.net

i used hyperlink column in the datalist,if i will click any one of the hyperlink that value going to display in the nextpage.how to write a code
Left by sathya on Oct 28, 2007 8:04 PM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
how can i use it for passing multiple values to a javascript.i want to generate a small popup with gridrow values
Left by Dhaval on Nov 19, 2007 9:52 PM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
how can we send multiple parameters one from the database another from query string
Left by Binju on Nov 22, 2007 12:31 AM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
Thanks, just what I was looking for. I hope you don't mind me posting this on my blog too.
Left by Remy Blaettler on Jan 16, 2008 3:08 AM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
What if i want to open a popup ie Window.open
Left by Pradeep bisht on Feb 03, 2008 10:21 PM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
Hi,
In the hyperlink created below I am sending two parameters as Query String, one is an id and another one is datetime in the database. When I was selecting the datetime as it was then hyperlink was not able to navigate with the desired info (date and id). What i did I typecasted the date field to varchar in the sql command like convert(varchar,SubmittedOn,101) then hyperlink was successfully navigating to the next url.

<asp:HyperLinkField NavigateUrl="~/TestAssignment.aspx" DataNavigateUrlFormatString="TestAssignment.aspx?Id={0}&SubmittedOn={1}"
DataTextField="LogNo" DataNavigateUrlFields="LogNo,SubmittedOn" HeaderText="Log No"></asp:HyperLinkField>
Left by Ashish Tripathi on Apr 23, 2008 1:21 AM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
Really good job man, I have been looking for this one really bad. Thanks
Left by vish on May 05, 2008 1:50 PM

# re: Passing Multiple Fields With GridView HyperLink Column
Requesting Gravatar...
what if we convert the hyperlinkfield to templatefield ?
Left by Mehdi Nait Yahia on Jun 10, 2008 10:47 PM

Your comment:
 (will show your gravatar)


Copyright © Mohammad Azam | Powered by: GeeksWithBlogs.net | Join free