Latest web development tutorials

ASP.NET LinkButton PostBackUrl property

LinkButton control LinkButton control

Definition and Usage

PostBackUrl property gets or sets the URL when the LinkButton control is clicked to return the target page.

grammar

<asp:LinkButton PostBackUrl="string" runat="server" />

属性 描述
string 字符串值。规定要回传的目标页面的 URL。默认是空字符串,这会导致页面向自身回传。


Examples

The following example sets the return URL LinkButton controls:

<form runat="server">
Name:<asp:TextBox id="TextBox1" runat=Server />
<asp:LinkButton id="Button1" Text="Submit"
PostBackUrl="demo_postbackurl.htmlx" runat="Server" />
</form>

The demonstration >>

LinkButton control LinkButton control