Alex Rivera | Logout

What is the difference between Hyperlink control and link control in ASP.NET?

Asked 2009-06-01T05:30:20.250
14

What is the difference between Hyperlink control and link control ASP.NET?

Edit
Report

1 Answer

5

The <asp:Hyperlink> control is a Web server control, while the <a> link is the bare-bones HTML control.

Like all WebControls, the former provides a full featured programming event model, while the latter allows you to render an HTML anchor. You could add the runat="server" attribute to the link control to enable it to be accessed in server-side code. This attribute would however be required for the Hyperlink control (because it is a ASP.NET object that renders as an <a> hyperlink in HTML.

answered 2009-06-01T05:40:24.743

Your Answer