[ASP.NET] page guide

[The ASP.NET] each web guide


When we need to link to a different Web page can do so in accordance with the following method.

1. hyperlink:

HyperLink control using the VS toolbox established, then follow the link to the user's needs-oriented page, set its NavigateUrl property.

Snapshot -2009325154613

  Snapshot -2009325154535

2.用Response.Redirect

The command sent to the user's browser ( Browser )

Response.Redirect("~/Target.aspx");

3. Use PostBack

As long as the use of button control PostBackUrl property, you will be able to guide the desired page.

Snapshot -2,009,325,155,820

4.Server.Transfer

Since the guide conduct took place in the Server, so the user's browser ( Browser ) in the address bar, you can not know the correct Url, assume that our original page is Source.aspx, even when it is used to Target.aspx Server.Transfer a web page, the address bar will continue to appear Source.aspx, with hidden page Url specific functions.

Server.Transfer("~/Target.aspx");

If any error, please notify the novice posting him to bear

2010 ~ 2017 C # in the fourth quarter

Original: Large column  [ASP.NET] page guide


Guess you like

Origin www.cnblogs.com/chinatrump/p/11516349.html