Thanks for Scott's informative suggestion.
Hi Gary,
As Scott has mentioned, since the HyperLink columns will contain a
HyperLink control in it's Cell, we need to retrieve the HyperLink control
first , then access its properties. For example:
private void btnSubmit_Click(object sender, System.EventArgs e)
{
foreach(DataGridItem dgi in dgData.Items)
{
HyperLink hl = dgi.Cells[0].Controls[0] as HyperLink;
if(hl!=null)
{
Response.Write("<br>Text: " + hl.Text + " Link: " + hl.NavigateUrl);
}
}
}
thanks.
Regards,
Steven Cheng
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)