I got stuck here and I want to know how they actually .aspx page work when I send the request for the .aspx page the first time how HTML comes to the browser and when I click on the button what happens behind how the .aspx page gets executed and I want to know does it really need to know this in detail? and how. Does the aspx.cs page work?
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace sample1
{
public partial class First : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Write("Welcome");
}
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="First.aspx.cs" Inherits="sample1.First" %>
<!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" OnClick="Button1_Click" />
</div>
</form>
</body>
</html>