We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3decc78 commit b427e60Copy full SHA for b427e60
viewstate code
@@ -0,0 +1,38 @@
1
+ViewState
2
+
3
+//state.aspx.cs
4
5
+using System;
6
7
+using System.Collections.Generic;
8
9
+using System.Linq;
10
11
+using System.Web; using System.Web.UI;
12
13
+using System.Web.UI.WebControls;
14
15
+public partial class state: System.Web.UI.Page
16
17
+{
18
19
+protected void Page_Load(object sender, EventArgs e)
20
21
22
23
+if (!IsPostBack)
24
25
26
27
+string str = "Gintoki";
28
29
+if (ViewState["name"] == null)
30
31
+{ ViewState["name"] = str;
32
33
+protected void Button1_Click(object sender, EventArgs e)
34
35
+{ Label1.Text = ViewState["name"].ToString();
36
37
+}
38
0 commit comments