Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Default2 : System.Web.UI.Page
- {
- string minima = "Good Evening";
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!Page.IsPostBack) {
- TextBox1.Text = minima;
- ViewState["Count"] = 0;
- }
- Label1.Text = "Currently online " + Convert.ToString(ViewState["UserCount"]) + " users";
- Label2.Text = "Clicks from previous users: " + ViewState["Count"].ToString();
- }
- protected void Button1_Click(object sender, EventArgs e)
- {
- TextBox2.Text = TextBox1.Text;
- ViewState["Count"] = Convert.ToInt32(ViewState["Count"]) + 1;
- Label3.Text = "Curent Clicks: " + Convert.ToString(ViewState["Previous"]);
- }
Add Comment
Please, Sign In to add comment