A link in datagrid

tiffany

Well-known member
Joined
Aug 7, 2005
Messages
57
Programming Experience
1-3
Hi, currently i'm using Ms SQL for my project. I will like to have a link but not hyperlink in a datagrid. Once the link is click, code-behind will do some actions and will be bought to a page where all the retrieve datas are display.


How can i do this? What data type should i select to store the attribute so that it can provide some code - behind to invoke the methods?

thnk.
tiffany
 
First add this line inside ur datagrid columns tag
<asp:ButtonColumn Text="Edit" HeaderText="Edit" CommandName="edit" />

then add this script

Sub EditCat_Handle(sender as Object, e As DataGridCommandEventArgs)
If (e.CommandName="edit") then


dim strURLRedirect as string

strURLRedirect = "xyz.aspx
Server.Transfer(strURLRedirect)
End if

I am sure it will work.
 
Back
Top