How to Pass Muliple Fields with Gridview HyperLink Column

Posted By  RRaveen On 13 Sep 2011 01:09:58
emailbookmarkadd commentsprint
No of Views:544
Bookmarked:0 times
Votes:0 times

Introduction

In this tip, I will explore that how to Pass Muliple Fields with Gridview HyperLink Column.It is very simple and must be syntax correct, then only it work.

<asp:GridView ID="gvProducts" runat="server">
                    <Columns>
                        <asp:HyperLinkField DataTextField="CategoryName" DataNavigateUrlFields="ProductID,Name"
                            DataNavigateUrlFormatString="~/productview.aspx?ID={0}&Name={1}" />
                    </Columns>
                </asp:GridView>

Note:DataNavigateUrlFields is case sensitives in C#, so be very cafeful on that.

Hope help and thank you

Sign Up to vote for this article
Other popular Tips/Tricks
Comments
There is no comments for this articles.
Leave a Reply
Title:
Display Name:
Email:
(not display in page for the security purphase)
Website:
Message:
Please refresh your screen using Ctrl+F5
If you can't read this number refresh your screen
Please input the anti-spam code that you can read in the image.
^ Scroll to Top