Click here to Skip to main content
15,900,641 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to add a link through data gridin web page

like "http://screencast.com/t/JU3JqaOITy6r"
Posted

Have a look at Mastering Databinding[^]

Easiest was is to have an ItemTemaplate and use the <%# %> syntax

I'm assuming you're binding to a datasource
 
Share this answer
 
Set the AutoGeneratedColumns property of gridview to false and then in itemtemplate field add your link with a href.

ASP
 <asp:gridview id="gridview1" runat="server" autogeneratedcolumns="false">
   <columns>
     <templatefield headertext="">
       <itemtemplate>
         <a href="your link">Name of link</a>
       </itemtemplate>   
     </templatefield>
   </columns>

</asp:gridview>


In ItemTemplate you can also place hyperlink, linkbutton or any controls as per your requirements.

Good luck.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900