Create a Local Web Server ASP.NET Application

සොයන්න

1.7.11

  1. Start Microsoft Visual Studio .NET.
  2. On the File menu, point to New, and then click Project.
  3. In the New Project dialog box, click Visual Basic Projects under Project Types, and then click ASP.NET Web Application under Templates to create the project in Visual Basic.
    NOTE: Alternatively, you can click Visual C# Project under Project Types, and then click ASP.NET Web Application under Templates to create the project in Visual C#.
  4. In the IIS Web folder (which is typically /wwwroot), create the essential project references and files to use as a starting point for your application:
    • AssemblyInfo (.vb file for Visual Basic or .cs file for Visual C#): Use this file to describe the assembly and to specify version information.

sing System.Reflection;
using System.Runtime.CompilerServices;

[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]

[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]

[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]

[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] 

[assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyDelaySign(false)]

[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]

Global.asax: The basic file Global.asax.cs that contains code for responding to application-level events that ASP.NET raises.

<%@ Application Codebehind="Global.asax.cs" Inherits="WebApplication2.Global" %>

  • NOTE: The source of Global.asax.cs is not included in this document.
  • Styles.css: This file contains the default HTML style settings.
  • Web.config: This is an application configuration file that contains settings that are specific to an application. This file contains configuration settings that the common language runtime reads (such as assembly binding policy, remoting objects, and so on), and settings that the application can read.
  • Projectname.vsdisco: This is an XML-based file that the ASP.NET dynamic XML Web service discovery process uses to identify searchable paths on the Web server.
  • WebForm1.aspx: This file contains the portion of the default Web Forms page that contains user interface elements (controls), similar to an HTML page.

<%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="WebApplication2.WebForm1" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>

  <head>
    <title>WebForm1</title>

    <meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
    <meta name="CODE_LANGUAGE" Content="C#">

    <meta name=vs_defaultClientScript content="JavaScript">
    <meta name=vs_targetSchema

content="http://schemas.microsoft.com/intellisense/ie5">
  </head>

  <body MS_POSITIONING="GridLayout">
    <form id="Form1" method="post" runat="server">

    </form>
  </body>

</html>

    • Webform1 (.vb file for Visual Basic or .cs file for Visual C#): This file contains a class file for the default Web Forms page that contains the system-generated and user code for the page.
  1. After you create the project, you see an empty Web Form with that is named "WebForm1.aspx." This is the workspace of the first page in a project, in which you can place WebForms, HTML forms, Components, Data objects, and Clipboard elements from ToolBox.

0 comments:

Post a Comment

පරිගණක උදවු ගැන ඔබේ අදහස

PCWorld නවතම පුවත්