Tuesday 19 June 2012

Hyperlink

Hyperlink control is used to navigate to the target URL when user clicks on the link.Hyperlink control and LinkButton control looks similar but there is some difference between Hyperlink and LinkButton control in ASP.NET.When user clicks on a Hyperlink control the hyperlink control does not PostBack the page to the server.It will simply post the request to the server for the URL set in NavigateURL property.While LinkButton works like a simple button but it looks like a Hyperlink so LinkButton will PostBack the page to server.One other difference is that Hyperlink control does not have a OnClick event just like in LinkButton control.

Some Commonly Used Properties of Hyperlink Control
ImageURL Property:
This property is used to gets or sets the path to an image to display for the Hyperlink Control.
IsTrackingViewState Property:
This property is used to gets a value that indicates whether the server control is saving changes to its view state.It will return a simple boolean value which represents true or false.If returned value is true that mean the control is set to save view state while in case of false the control will not save the view state.
NavigateURL Property:
This property is used to gets or sets the URL to the link to when hyperlink control is clicked.

To see more properties click on link given below:

1 comment:

  1. The post is written in very a good manner and it entails many useful information for me. I appreciated what you have done here. I am always searching for informative information like this. Thanks for sharing with us.

    Asp.net Development | ROR Development

    ReplyDelete