Getting ID from Datagrid hyperlink column

  • Thread starter Thread starter Child
  • Start date Start date
C

Child

I have a datagrid containing a column:

<asp:Hyperlinkcolumn
headertext="View/Edit"
Datanavigateurlfield="individualid"
Datanavigateurlformatstring="edit_ind.aspx?indid={0}"
Text="View"/>


I would like to use that indid on the page the link refers to in a query. How do I retrieve it?
What scope is it in?

Thanks in advance!!

--
BethF, Anchorage, AK

It's YOUR God.
They are YOUR rules.
YOU burn in hell.
 
Hope this helps
Private sub DataGrid_ItemCommand(ByVal source As Object,
ByVal e As
System.Web.UI.WebControls.DataGridCommandEventArgs)
Handles ...

dim Mystr as string
Mystr = CType(e.Item.Cells(1).Controls(0), LinkButton).Text
'Assuming your control is in cell(1)
'Once you have the string you can extract the ID from
there.
end sub



It sure does!


--
BethF, Anchorage, AK

It's YOUR God.
They are YOUR rules.
YOU burn in hell.
 
Back
Top