« Home « Chủ đề tài liệu học ASP.NET

Chủ đề : tài liệu học ASP.NET


Có 20+ tài liệu thuộc chủ đề "tài liệu học ASP.NET"

ASP.NET 4 Unleased - p 1

tailieu.vn

ASP.NET 4. ptg ASP.NET 4 Unleashed. ASP.NET 4.0 unleashed / Stephen Walther, Kevin Hoffman, Nate Dudek.. Microsoft .NET. Part I Building ASP.NET Pages 1 Overview of the ASP.NET Framework...5. 2 Using the Standard Controls ...59. 3 Using the Validation Controls...121. 4 Using the Rich Controls ...179. Part II Designing ASP.NET Websites 5 Designing Websites with Master Pages...237. 7 Creating Custom...

ASP.NET 4 Unleased - p 2

tailieu.vn

12 Using the DetailsView and FormView Controls . Using the DetailsView Control. Displaying Data with the DetailsView Control ...567. Using Fields with the DetailsView Control. Displaying Empty Data with the DetailsView Control...573. Paging through Data with the DetailsView Control ...576. Updating Data with the DetailsView Control . Inserting Data with the DetailsView Control . Deleting Data with the DetailsView Control...

ASP.NET 4 Unleased - p 3

tailieu.vn

33 Building ASP.NET MVC Applications . Introducing the ASP.NET MVC Framework . Creating Your First ASP.NET MVC Application...1502. Using the Web Site Administration Tool ...1513. Using the ASP.NET Microsoft Management Console Snap-In...1514. ASP.NET Configuration Sections . Using the Configuration API . Using the Configuration Class ...1536. 35 Deploying ASP.NET Web Applications . ...1573 ASP.NET 4 Unleashed. 36 Building Custom Controls...

ASP.NET 4 Unleased - p 4

tailieu.vn

CHAPTER 1 Overview of the ASP.NET Framework. ASP.NET and the.NET Framework. Understanding ASP.NET Controls. Understanding ASP.NET Pages . Installing ASP.NET. L et’s start by building a simple ASP.NET page.. For information on installing ASP.NET, see the last sec- tion of this chapter.. We discuss Ajax later in the book.. After you create a new website, you can add an ASP.NET...

ASP.NET 4 Unleased - p 5

tailieu.vn

ASP.NET gives you the most commonly used. System.Collections. System.Collections.Generic . System.Collections.Specialized . System.ComponentModel.DataAnnotations . System.Configuration. System.Data.Entity.Linq . System.Data.Linq . System.Text. System.Text.RegularExpressions . System.Web. System.Web.Caching . System.Web.DynamicData . System.Web.SessionState . System.Web.Security . System.Web.Profile . System.Web.UI. System.Web.UI.WebControls. System.Web.UI.WebControls.WebParts . System.Web.UI.HtmlControls. System.Xml.Linq. \Windows\Microsoft.NET\Framework\v4.0.30128\Config\Web.Config. An assembly is the actual .dll file on your hard drive in which the classes in.NET Framework are stored. For...

ASP.NET 4 Unleased - p 6

tailieu.vn

In Design view, you can double-click a control to add a handler for the control’s default ptg event. Finally, from Design view, after selecting a control on the designer surface, you can add an event handler from the Properties window by clicking the Events button (the lightning bolt) and double-clicking next to the name of any of the events (see...

ASP.NET 4 Unleased - p 7

tailieu.vn

Understanding ASP.NET Pages. This section examines ASP.NET pages in more detail. You learn about dynamic compila- tion and code-behind files. Strangely enough, when you create an ASP.NET page, you are actually creating the source code for a .NET class. You are creating a new instance of the System.Web.UI.Page class.. The entire contents of an ASP.NET page, including all script and...

ASP.NET 4 Unleased - p 8

tailieu.vn

Whenever you request an ASP.NET page, a particular set of events is raised in a particular sequence. This sequence of events is called the page execution lifecycle.. For example, we have already used the Page Load event in previous code samples. You normally use the Page Load event to initialize the properties of controls contained in a page. However, the...

ASP.NET 4 Unleased - p 9

tailieu.vn

ptg 54 CHAPTER 1 Overview of the ASP.NET Framework. You can output any string to the Trace. You can call the Trace.Warn() method wherever you need in your code. Because the Trace Information section appears even when an error exists on your page, you can use tracing to diagnose the causes of any page errors.. You can get around this...

ASP.NET 4 Unleased - p 10

tailieu.vn

<title>Label Form</title>. <form id=”form1” runat=”server”>. <asp:Label. id=”lblFirstName”. Runat=”server” />. <asp:TextBox. id=”txtFirstName”. id=”lblLastName”. id=”txtLastName”. For example, if you select View Source on your web browser, you see that the first Label in Listing 2.3 renders the following content to the browser:. <label for=”txtFirstName” id=”lblFirstName”>First Name:</label>. A side benefit of using the AssociatedControlID property is that clicking a label when this property...

ASP.NET 4 Unleased - p 11

tailieu.vn

Runat=”server” />. <asp:Button id=”btnSubmit”. Text=”Submit”. Finally, the TextBox control supports the Focus() method. You can use the Focus() method to shift the initial form focus to a particular TextBox control. For example, the page in Listing 2.9 sets the focus to the first of two form fields.. LISTING 2.9 TextBoxFocus.aspx. Page Language=”C#” %>. <script runat=”server”>. <html xmlns=”http://www.w3.org/1999/xhtml” >. <head id=”Head1”...

ASP.NET 4 Unleased - p 12

tailieu.vn

The ASP.NET Framework includes three controls you can use to submit a form to the server: Button , LinkButton , and ImageButton . You also learn how to use a button control to post a form to a page other than the current page.. Finally, you learn how to handle a button control’s Command event.. Using the Button Control. The...

ASP.NET 4 Unleased - p 13

tailieu.vn

You can use this property to execute any client-side code that you need when a button is clicked. The page in Listing 2.18 illustrates how you can use the OnClientClick property to display a confirmation dialog box (see Figure 2.14).. LISTING 2.18 ButtonOnClientClick.aspx. Page Language=”C#” %>. “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>. <script runat=”server”>. lblResult.Text = “All pages deleted!”;. <html xmlns=”http://www.w3.org/1999/xhtml” >. <head id=”Head1” runat=”server”>....

ASP.NET 4 Unleased - p 14

tailieu.vn

The Image control simply displays an image. The ImageMap control enables you to create a client-side, clickable, image map.. Using the Image Control. The image is displayed by setting the ImageUrl property of the Image control contained in the body of the page.. Page Language=”C#” %>. “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>. <script runat=”server”>. imgRandom.AlternateText = “Picture 1”;. imgRandom.AlternateText = “Picture 2”;. imgRandom.AlternateText = “Picture...

ASP.NET 4 Unleased - p 15

tailieu.vn

ptg The Panel control supports the following properties (this is not a complete list):. DefaultButton —Enables you to specify the default button in a Panel . Direction —Enables you to get or set the direction in which controls that display text are rendered. GroupingText —Enables you to render the Panel control as a fieldset with a particular legend.. HorizontalAlign —Enables...

asp.net 4 unleased - p 16

tailieu.vn

<asp:Label. id=”lblProductQuantity”. Text=”Product Quantity:”. Runat=”server” />. <asp:TextBox. id=”txtProductQuantity”. <asp:RequiredFieldValidator id=”reqProductQuantity”. <asp:CompareValidator id=”CompareValidator1”. <asp:Button id=”btnSubmit”. Text=”Submit Product Order”. id=”lblResult”. ptg A separate RequiredFieldValidator control is associated with each of the three form. If you attempt to submit the form in Listing 3.1 without entering a value for a field, a validation error message display (see Figure 3.1).. This property accepts the...

asp.net 4 unleased - p 17

tailieu.vn

ptg LISTING 3.5 ShowValidationGroups.aspx. Page Language=”C#” %>. “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>. <script runat=”server”>. lblLoginResult.Text = “Log in successful!”;. lblRegisterResult.Text = “Registration successful!”;. <html xmlns=”http://www.w3.org/1999/xhtml” >. <head id=”Head1” runat=”server”>. <style type=”text/css”>. <title>Show Validation Groups</title>. <form id=”form1” runat=”server”>. <div class=”column”>. <asp:Label. id=”lblUserName”. Text=”User Name:”. Runat=”server” />. <asp:TextBox. id=”txtUserName”. <asp:RequiredFieldValidator id=”reqUserName”. ControlToValidate=”txtUserName”. id=”lblPassword”. Text=”Password:”. id=”txtPassword”. <asp:RequiredFieldValidator id=”reqPassword”. ControlToValidate=”txtPassword”. <asp:Button id=”btnLogin”. Text=”Login”. Runat=”server” OnClick=”btnLogin_Click” />. id=”lblLoginResult”. id=”lblFirstName”....

ASP.NET 4 Unleased - p 18

tailieu.vn

ptg 144 CHAPTER 3 Using the Validation Controls. ControlToValidate —The ID of the form field validated.. Text —The error message displayed when validation fails.. MinimumValue —The minimum value of the validation range.. MaximumValue —The maximum value of the validation range.. Type —The type of comparison to perform. For example, the page in Listing 3.9 includes a RangeValidator that validates an...

ASP.NET 4 Unleased - p 19

tailieu.vn

Using the CustomValidator Control. If none of the other validation controls perform the type of validation that you need, you can always use the CustomValidator control. You can associate a custom validation func- tion with the CustomValidator control.. The CustomValidator control has three important properties:. ControlToValidate —The ID of the form field being validated.. Text —The error message displayed when...

ASP.NET 4 Unleased - p 20

tailieu.vn

ptg 164 CHAPTER 3 Using the Validation Controls. id=”txtLastName”. Runat=”server” />. <asp:RequiredFieldValidator id=”reqLastName”. ControlToValidate=”txtLastName”. <asp:Button id=”btnSubmit”. If you submit the form in Listing 3.18 without entering a value for the first and last name, validation error messages appear in both the body of the page and in the. DisplayMode —Enables you to specify how the error messages are formatted. HeaderText...