« Home « Chủ đề Tổng quan về Web Server Controls

Chủ đề : Tổng quan về Web Server Controls


Có 40+ tài liệu thuộc chủ đề "Tổng quan về Web Server Controls"

Professional ASP.NET 3.5 in C# and Visual Basic Part 20

tailieu.vn

Choosing a Date Format to Output from the Calendar. The Calendar control also allows you to write out the date in a number of other formats, as detailed in the following list:. ToFileTime : Converts the selection to the local operating system file time . ToFileTimeUtc : Converts the selection to the operating system file time, but instead of using...

Professional ASP.NET 3.5 in C# and Visual Basic Part 21

tailieu.vn

The advantage of using the Panel control to encapsulate a set of other elements is that you can manipulate these elements as a single unit using one attribute set in the Panel control itself. For example, setting the Font-Bold attribute to True causes each item within the Panel control to adopt this attribute.. The new addition to the Panel control...

Professional ASP.NET 3.5 in C# and Visual Basic Part 22

tailieu.vn

The ValueChanged event is triggered when the ASP.NET page is posted back to the server if the value of the HiddenField server control has changed since the last time the page was drawn. Therefore, the method is useful to act upon any changes to the HiddenField control — such as recording a value to the database or changing a value...

Professional ASP.NET 3.5 in C# and Visual Basic Part 23

tailieu.vn

You can put any number of elements and controls in each view, and the end user can work through the views based upon the sequence numbers that you assign to the views.. You also can create your controls directly in the code, as shown in Listing 3-40.. <asp:MultiView ID="MultiView1". <asp:View ID="View1". <i>Heat 1/2 tsp of butter in cast iron pan.<br...

Professional ASP.NET 3.5 in C# and Visual Basic Part 24

tailieu.vn

By working with these events, you can create a multi-step form that saves all the end user’s input information when he changes from one step to the next. You can also use the FinishButtonClick event to save everything that was stored in each of the steps at the end of the process. The Wizard control remembers all the end user’s...

Professional ASP.NET 3.5 in C# and Visual Basic Part 25

tailieu.vn

Remember that you have no way to validate the truthfulness of the information you collect. Is something entered in the text box?. Is the data entered in the text box in the form of an e-mail address?. Applying more rules to elements increases the strictness of the validation applied to the data.. Just remember that data collection on the Internet...

Professional ASP.NET 3.5 in C# and Visual Basic Part 26

tailieu.vn

associates itself with one of the form elements on the page. In this case, you need only a single CompareValidator control on the page because a single comparison is made. In this case, the value is TextBox1. If the two text boxes do not match after the page is posted by the end user, the value of the Text property...

Professional ASP.NET 3.5 in C# and Visual Basic Part 27

tailieu.vn

If you create your own server-side validations, you can make them as complex as your applications require. For an example of using the CustomValidator control for some custom server-side validation, you can work with the same example as you did when creating the client-side validation. Listing 4-15: Using the CustomValidator control to perform server-side validations. <script runat="server">. <html xmlns="http://www.w3.org/1999/xhtml">. <head...

Professional ASP.NET 3.5 in C# and Visual Basic Part 28

tailieu.vn

end user clicks a button on the page. <head runat="server">. <form id="form1". runat="server">. Louis .NET User Group</h1>. <asp:TextBox ID="TextBox1". Runat="server"></asp:TextBox>&nbsp. <asp:TextBox ID="TextBox2". TextMode="Password"></asp:TextBox>&nbsp;. <asp:Button ID="Button1". <asp:RequiredFieldValidator ID="RequiredFieldValidator1". ValidationGroup="Login">. </asp:RequiredFieldValidator>. <asp:RequiredFieldValidator ID="RequiredFieldValidator2". Our main meeting is almost always held on the last Monday of the month.. Check the home page of the web site for details. You can also check our...

Professional ASP.NET 3.5 in C# and Visual Basic Part 29

tailieu.vn

Start by reviewing the code for the master page. Instead of using the Page directive, as you would with a typical .aspx page, you use the Master directive for a master page. This master page uses only a single attribute, Language . The Language attribute’s value here is VB , but of course, you can also use C# if you...

Professional ASP.NET 3.5 in C# and Visual Basic Part 30

tailieu.vn

<b>Your GUID number from the master page is:<br />. <asp:Label ID="Label1". /></b><p>. <asp:Textbox ID="TextBox1". <asp:Button ID="Button1". <asp:Label ID="Label2". </asp:Content>. <asp:Content ID="Content3". <asp:Image ID="Image1". MasterPageFile="~/wrox.master". In this example, the master page in Listing 5-8 first creates a GUID that it stores as a text value in a Label server control on the master page itself. The master page generates this GUID...

Professional ASP.NET 3.5 in C# and Visual Basic Part 31

tailieu.vn

ReutersEurope.master. MasterPageFile="~/ReutersMain.master". <asp:Content ID="Content1". </asp:Content>. <asp:Content ID="Content2". <asp:Label ID="Label1". <asp:ContentPlaceHolder ID="ContentPlaceHolder1". </asp:ContentPlaceHolder>. Looking this page over, you can see that it isn’t much different than a typical .aspx page that makes use of a master page. The MasterPageFile attribute is used just the same, but instead of using the @Page directive, the @Master page directive is used. This attribute is...

Professional ASP.NET 3.5 in C# and Visual Basic Part 32

tailieu.vn

If you have multiple pages, you may find that it is nice not to have to think about applying styles to everything you do as you build because the styles are already centrally defined for you.. In addition to applying an ASP.NET theme to your ASP.NET pages using the Theme attribute within the Page directive, you can also apply it...

Professional ASP.NET 3.5 in C# and Visual Basic Part 33

tailieu.vn

The first is to incorporate the images directly from the .skin file itself. You can do this with the TreeView server control. If you do so, you can then define the TreeView server control in the .skin file, as shown in Listing 6-6.. <asp:TreeView runat="server". Font-Size=".9em". </asp:TreeView>. When you run a page containing a TreeView server control, it is populated...

Professional ASP.NET 3.5 in C# and Visual Basic Part 34

tailieu.vn

Before running the page, be sure to apply the defined theme on the page using the Theme attribute in the @Page directive. With everything in place, running the page produces the following results in the browser:. FROM THE SKIN FILE. This value, which was specified in the skin file, is displayed no matter what you apply as the HeaderText value...

Professional ASP.NET 3.5 in C# and Visual Basic Part 35

tailieu.vn

<asp:QueryStringParameter Name="CustomerID". </asp:QueryStringParameter>. </asp:SqlDataSource>. In addition to hand-coding your SelectParameters collection, you can create parameters using the Command and Parameter Editor dialog, which can be accessed by modifying the SelectQuery property of the SqlDataSource control while you are viewing the Web page in design mode. demonstrates how to add the QuerystringParameter (based on the value of the querystring Field ID)...

Professional ASP.NET 3.5 in C# and Visual Basic Part 36

tailieu.vn

<asp:querystringparameter DefaultValue="0". </asp:LinqDataSource>. You can add multiple Where parameters that the control will automatically concatenate in its Where property using the AND operator. You can manually change the default value of the Where property if you want to have multiple WhereParameters defined, but only use a subset, or if you want to change which parameters are used dynamically at runtime....

Professional ASP.NET 3.5 in C# and Visual Basic Part 37

tailieu.vn

First, none of the information in the web.config file can be strongly typed. A second problem was that although the web.config file was secured from access by browsers (it cannot be served up by Internet Information Server), the data within the file was clearly visible to anyone who had file access to the Web server.. tions in the web.config file....

Professional ASP.NET 3.5 in C# and Visual Basic Part 38

tailieu.vn

<script runat="server">. Notice the listing uses the GridView’s Sorting event to manipulate the value of the control’s SortEx- pression property. The events parameters enable you to examine the current sort expression, direct the sort, or even cancel the sort action altogether. The GridView also offers a Sorted event which is raised after the sort has completed.. Enabling the GridView Pager....

Professional ASP.NET 3.5 in C# and Visual Basic Part 39

tailieu.vn

<asp:SqlDataSource ID="SqlDataSource1". @original_CustomerID">. The UpdateParameters element, shown in Listing 7-36, works much like the SelectParameters element discussed earlier in the chapter.. Listing 7-36: Adding UpdateParameters to the SqlDataSource control. <asp:Parameter Type="String". Name="CompanyName"></asp:Parameter>. Name="ContactName"></asp:Parameter>. Name="ContactTitle"></asp:Parameter>. Name="Address"></asp:Parameter>. Name="City"></asp:Parameter>. Name="Region"></asp:Parameter>. Name="PostalCode"></asp:Parameter>. Name="Country"></asp:Parameter>. Name="Phone"></asp:Parameter>. Name="Fax"></asp:Parameter>. Name="CustomerID"></asp:Parameter>. </asp:SqlDataSource>. Within the UpdateParameters element, each named parameter is defined using the <asp:Parameter>. Remember that you can also...