Friday 24 January 2014

How to add controls in a webform

  • 1. What is ASP?

    Active Server Pages (ASP), also known as Classic ASP, is a Microsoft's server-side technology, which helps in creating dynamic and user-friendly Web pages. It uses different scripting languages to create dynamic Web pages, which can be run on any type of browser. The Web pages are built by using either VBScript or JavaScript and these Web pages have access to the same services as Windows application, including ADO (ActiveX Data Objects) for database access, SMTP (Simple Mail Transfer Protocol) for e-mail, and the entire COM (Component Object Model) structure used in the Windows environment. ASP is implemented through a dynamic-link library (asp.dll) that is called by the IIS server when a Web page is requested from the server.

    2. What is ASP.NET?

    ASP.NET is a specification developed by Microsoft to create dynamic Web applications, Web sites, and Web services. It is a part of .NET Framework. You can create ASP.NET applications in most of the .NET compatible languages, such as Visual Basic, C#, and J#. The ASP.NET compiles the Web pages and provides much better performance than scripting languages, such as VBScript. The Web Forms support to create powerful forms-based Web pages. You can use ASP.NET Web server controls to create interactive Web applications. With the help of Web server controls, you can easily create a Web application.

    3. What is the basic difference between ASP and ASP.NET?

    The basic difference between ASP and ASP.NET is that ASP is interpreted; whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).

    Create a Project
     
  • Open Visual Studio 2012>
  •  File > New > Projects>
  • Select type of project from dialogebox>
  • From the solution explorer>
  1. Right click on the UI(project Name) to add componants(eg: webform,Css,JavaScript File...)
  2. Right click on the Solution("Employee Managment) to add more projects
  • Select Item From the below box>
  • Hai.aspx is the new item (webform)
       Hai.aspx Contain....
  1. Hai.aspx.cs  : Coding Section(C# ,J#......)
  2. Hai.aspx.designers.cs: Represent all the controls definition used in that particular page(Hai.aspx)
  •  Sample Code for Beginers