HyperLink vs LinkButton

What Is the Difference Between Asp:HyperLink &



This Can use for navigation.

Eg :- <asp:HyperLink ID=”HyperLink1″
NavigateUrl=”~/Default.aspx” >Home</asp:HyperLink>


The HyperLink will not PostBack your page to the server. It
will post a simple request to the server for the URL you set as NavigateUrl.

OnClick event

The HyperLink doesn’t have
the OnClick event.



It also use for navigation.

Eg:- <asp:LinkButton ID=”LinkButton1″
PostBackUrl=”~/Default.aspx”> Save </asp:LinkButton>


The LinkButton works exactly as a normal Button but it looks like a HyperLink (<a
href=”…”> something </a>)
, so it will PostBack your page to
the server allowing you to do your business (like setting variables at
session level or doing some DB operation or whatever).

OnClick event

We can Use OnClick event.

So, if you’re asking yourself “which one should I use?

Here’s the answer: if you need to do any operation with data
that’s on the page you will have to use a LinkButton (or a Button), but if you
just need to redirect the user to somewhere else go for a HyperLink (You will
avoid half roundtrip!).

you want to avoid having Button
or LinkButton handlers with
just this code: Response.Redirect(“Default.aspx”);

And key
thing about SEO Friendly it is better to use HyperLink.