Create First ASP.NET Web Forms Project In Visual Studio | Web Forms
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="MY_FIRST_PROJECT_PRACTICE.WebForm1" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="CLICK" Height="31px" Width="75px" OnClick="Button1_Click"/>
<asp:Label ID="Label1" runat="server" Text="Label" Visible="false"></asp:Label>
</div>
</form>
</body>
</html>
Above File is MY_FIRST_PROJECT_PRACTICE\WebForm1.aspx
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace MY_FIRST_PROJECT_PRACTICE
{
public partial class WebForm1 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Label1.Text = "Welcome to ASP.NET";
Label1.Visible = true;
}
}
}
Above File is MY_FIRST_PROJECT_PRACTICE\WebForm1.aspx.cs
.png)
.png)
.png)
Comments
Post a Comment