Learn ASP.net Programming with Genrontech. Find Full Lectures and Tutorials on ASP.Net. Get All Solved ASP.Net Assignments and Total Lectures Based on ASP. Find Bellow Assignment number 2 of Lecture 1.
[ResponsiveRect]
Lecture 1
Asp.Net Programming Assignment no 2 – ASP Tutorial for Beginners
Objective:
Create a Web Site to show the Post Back property of Web pages.
Controls, Methods, Properties & Event Used:
- Label
- Button
- Is Post back
- Enable View State
Output:
Program:
[LinkVer]
using System;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class frmpostback : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
lblBpost.Text = “Page is not in Post back”;
}
}
protected void Button1_Click(object sender, EventArgs e)
{
lblApost.Text = “Page is in post back”;
}
}