Create ASPX Page in ASP.Net and C#

How to add an .aspx page in asp.net website



In this post we are going to explain how to add a new .aspx page in our Asp.net website.
As we know that .aspx page refers to a web page of asp.net website means we can say that these are active server page.

In my previous post we explain how to start are how to make a new website in asp.net. In next step we are going to add new page in our website.
If we see opened IDE then in right side of IDE. We see the name of website (directory of asp.net website).

·      1.   Right click on the root directory (Name of website) and go in add new item.

Creating ASPX Page in ASP.Net and C# by parijat


·        2.   Select C# Language and then website as we give in following image.

Creating ASPX Page in ASP.Net and C# by parijat
Creating ASPX Page in ASP.Net 


After adding a new page and open this page and make your design. When we are add .aspx page then we see there is two pages are created .aspx and .aspx.cs page. In the asp.net .aspx page is a user end page or we can say this is client side page. Basically we can use this for designing (HTML +CSS +JS).

And  .aspx.cs page is server side page. Here we can use C# language for coding.


New .aspx Page:

 <%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyFirst_webpage.aspx.cs" Inherits="MyFirst_webpage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>my Demo page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div align="center">
    <h1 style="color: #990000; height: 51px"> Hello frends this is my new aspx page.</h1>

    </div>
    </form>
</body>
</html>

Create aspx page at run time:

Other Asp.net related Post:


Comments

Popular posts from this blog