Creating a Microsoft ASP'NET Web Form - PowerPoint PPT Presentation

Loading...

PPT – Creating a Microsoft ASP'NET Web Form PowerPoint presentation | free to download - id: 270d40-ZmJmY



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Creating a Microsoft ASP'NET Web Form

Description:

Page Language='vb' Codebehind='Default.aspx.vb' Inherits='_Default'% html body ... Create additional Web Forms from the Solution Explorer. Lesson: Using ... – PowerPoint PPT presentation

Number of Views:1303
Avg rating:3.0/5.0
Slides: 14
Provided by: eri5160
Category:
Tags: asp | net | create | creating | form | microsoft | web

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Creating a Microsoft ASP'NET Web Form


1
Creating a Microsoft ASP.NET Web Form
2
Overview
  • Creating Web Forms
  • Using Server Controls

3
Lesson Creating Web Forms
  • What is a Web Form?
  • A web form is ASP.NET component that allows
    programmers build a web page.
  • Creating a Web Form with Visual Studio .NET

4
What Is a Web Form?
  • .aspx extension
  • Page attributes
  • _at_ Page directive
  • Body
  • Form
  • lt_at_ Page Language"vb" CodebehindDefault.aspx.vb
    " Inherits"_Default"gt
  • lthtmlgt
  • ltbodygt
  • ltform id"Form1" runat"server"gt
  • lt/formgt
  • lt/bodygt
  • lt/htmlgt

5
Creating a Web Form with Visual Studio .NET
  • New ASP.NET Web Applications create a default Web
    Form Default.aspx
  • Create additional Web Forms from the Solution
    Explorer

6
Lesson Using Server Controls
  • What is a Server Control?
  • Types of Server Controls
  • Saving View State
  • Demonstration Converting HTML Controls to Server
    Controls
  • HTML Server Controls
  • Web Server Controls
  • Selecting the Appropriate Control

7
What is a Server Control?
ltaspButton id"Button1" runat"server"
Text"Submit"/gt
  • Runat"server"
  • Events happen on the server
  • Have built-in functionality
  • Common object model
  • All have Id and Text attributes
  • Create browser-specific HTML

8
Types of Server Controls
  • HTML server controls
  • Ex) ltinput id"Button1" type"button"
    value"button" runat"server" /gt
  • Web server controls
  • Ex) ltaspButton ID"Button2" runat"server"
    Text"Button" /gt
  • Intrinsic controls
  • Validation controls
  • Rich controls
  • List-bound controls

9
Demonstration Converting HTML Controls to Server
Controls
  • Upgrade HTML controls to HTML server controls
  • Add a Web server control

10
HTML Server Controls
  • Based on HTML elements
  • Exist within the System.Web.UI.HtmlControls
    namespace

ltinput type"text" id"txtName" runat"server"
/gt
11
Web Server Controls
  • Exist within the System.Web.UI.WebControls
    namespace
  • Control syntax
  • HTML that is generated by the control

ltaspTextBox id"TextBox1" runat"server"gtText_to_
Display lt/aspTextBoxgt
ltinput name"TextBox1" type"text"
value"Text_to_Display" Id"TextBox1"/gt
12
Selecting the Appropriate Control
Use Web Server Controls if
Use HTML Server Controls if
You prefer a Visual Basic-like programming model
You prefer an HTML-like object model
You are writing a page that might be used by a
variety of browsers
You are working with existing HTML pages and want
to quickly add ASP.NET Web page functionality
The control will interact with client and server
script
The control will interact with server script
Bandwidth is not a problem
Bandwidth is limited
13
Demonstration Adding Server Controls to a Web
Form
  • Create a Web Form
  • Add TextBox, Button, and Label controls
  • Add a Calendar control
About PowerShow.com