My Profile

Wednesday, February 9, 2011

More Navigation Controls

Using PostBackUrl Property of PostBack Controls:

This is the 3rd method for navigation from one page to other page. It is quite simple than the above two methods of navigation. In this method we are not going to write any coding rather we just set a property “PostBackUrl” of the PostBack Controls like Button, LinkButton, ImageButton etc., . This property allows user to submit form to other form of web instead of same form (normal case). Using this property also we can navigate from one page to other page of the website.
It can also carry values while navigating. (it is a new feature added in ASP.NET 2.0) and it is also called as Cross-Page PostBack.

Note: For a control where we specify PostBackurl, no code should be written as it ignore that submit code.
Controls like CheckBox, RadioButton can do only straight PostBack.


HyperLink Control of ASP.NET :

Using HyperLink also we can provide navigation to other forms. 
Just place HyperLink Control and set “NavigateUrl” property to the page that we want to navigate.
  

HTML  HyperLink called <a> tag or anchor tag:


                    <a href = “url” >Text</a>

Here “a” refers to anchor tag, which makes the text as hyperlink. And “href” refers to hyperlink reference. The text in between <a> and </a> tags will be displayed as hyperlink.



---------------------------------------------------------- 
** If you like this post please like our page in facebook

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More