Hyperlink in Gridview

Posted by Sudhak under ASP.NET on 11/3/2009 | Views : 1582 | Status : [Member] | Replies : 4
Hi,

I have a gridview and a hyperlink is present in it for a particular field. When I click on the hyperlink field the link must open a site such as gmail or google.
Please help.


Regards,
Sudha




Responses

Posted by: Virendradugar on: 11/3/2009 [Member] [MVP] Silver

Up
0
Down
Hi Sudha,

You can set NavigateUrl property of Hyperlink to http://www.google.com.

If you want to open another window then set Target property to ="_blank".

Thanks,
Virendra Dugar.

Sudhak, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudhak on: 11/3/2009 [Member] Starter

Up
0
Down
Hi Virendar,

Thanks for your reply. It works fine.

Regards,
Sudha

Sudhak, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Virendradugar on: 11/3/2009 [Member] [MVP] Silver

Up
0
Down
Welcome Sudha..

Sudhak, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 11/3/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day Sudhak

it can be Done like this


<telerik:GridTemplateColumn HeaderText ="Read Story" UniqueName="TemplateColumn2">
<ItemTemplate>
<asp:HyperLink ID="Hlnk" ForeColor="Black" runat= "server" Text ="Read Story" Target ="_blank" NavigateUrl="http://www.google.com"></asp:HyperLink>
</ItemTemplate>
<HeaderStyle ForeColor="White" />
</telerik:GridTemplateColumn>


i used Telerik Control, its the same as asp.net gridview templates

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Sudhak, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response