forked from dotnet/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbutton.postbackurlpage2vb.aspx
46 lines (34 loc) · 1.12 KB
/
button.postbackurlpage2vb.aspx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!--<Snippet1>-->
<%@ page language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim text As String
' Get the value of TextBox1 from the page that posted
' to this page.
text = CType((PreviousPage.FindControl("TextBox1")), TextBox).Text
' Check for an empty string.
If Not (text = "") Then
PostedLabel.Text = "The string posted from the previous page is " _
& text & "."
Else
PostedLabel.Text = "An empty string was posted from the previous page."
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="head1" runat="server">
<title>Button.PostBackUrl Target Page Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Button.PostBackUrl Target Page Example</h3>
<br />
<asp:label id="PostedLabel"
runat="Server">
</asp:label>
</form>
</body>
</html>
<!--</Snippet1>-->