6
Answers

How to create hyperlink in gridview?

selva kumar

selva kumar

11y
976
1
hi i want to create hyper link inside grid view..first i tell u what i did.

i have 2 dropdownlist contains class and section..if i m selecting class=10th and section="a"
the grid view will  bind only name,class and section of all students who is studyind in section "a".here i want to create a hyper link..i if i clicking the hyperlink it will display all the details of the every students from newpage..

i have finished all the abow now i want to create hyperlink only...can any one help me out..
Answers (6)
0
Iftikar Hussain

Iftikar Hussain

NA 18.9k 275.5k 11y
can you share your code?

Regards,
Iftikar
0
selva kumar

selva kumar

NA 582 132.1k 11y
No, if i clicking Kirans viewdetail...the whole details of kiran should displayed on new page...

can u give me the c# code...
0
Iftikar Hussain

Iftikar Hussain

NA 18.9k 275.5k 11y
try like this

<asp:HyperLinkField 
      DataTextField="Section" 
      HeaderText="" 
      DataNavigateUrlFields="Section" 
      DataNavigateUrlFormatString="SectionDetails.aspx?SectionID={0}" />


Regards,
Iftikar
0
selva kumar

selva kumar

NA 582 132.1k 11y
Thanks For your reply...i have created hyper link...when i clicking view details of fist person...full details of fist person will displays on new page...give me an idea....
0
Iftikar Hussain

Iftikar Hussain

NA 18.9k 275.5k 11y
You can refer this link

http://www.ezzylearning.com/tutorial.aspx?tid=8093456

Regards,
Iftikar
0
Iftikar Hussain

Iftikar Hussain

NA 18.9k 275.5k 11y
Hi,
        try like this

<asp:TemplateField>
                    <ItemTemplate>
                        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Bind("LeadID") + Request.QueryString("type") %>'
                            Text=""></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>

Regards,
Iftikar