Có 100+ tài liệu thuộc chủ đề "Tổng quan về Web Server Controls"
tailieu.vn Xem trực tuyến Tải xuống
If you worked with the SQL Server personalization provider using SQL Server Express files as explained earlier, you probably found it easy to use. The personalization provider works right out of the box — without any set up or configuration on your part. Using the SQL Server personalization provider with a full-blown version of SQL Server, however, is a bit...
tailieu.vn Xem trực tuyến Tải xuống
This kind of authentication was fine in many ways, but it required developers to build every element and even manage the back-end mechanics of the overall system. ASP.NET 3.5 includes an authentication and authorization management service that takes care of the login, authentication, authorization, and management of users who require access to your Web pages or applications. This outstanding membership...
tailieu.vn Xem trực tuyến Tải xuống
<script runat="server">. True) pc.FirstName = Firstname.Text. pc.LastName = Lastname.Text pc.Age = Age.Text. runat="server">. <asp:CreateUserWizard ID="CreateUserWizard1". <asp:WizardStep ID="WizardStep1". <table width gt;<tr><td>. Firstname: </td><td>. <asp:TextBox ID="Firstname". Runat="server"></asp:TextBox>. Lastname: </td><td>. <asp:TextBox ID="Lastname". Age: </td><td>. <asp:TextBox ID="Age". </td></tr></table>. </asp:WizardStep>. <asp:CreateUserWizardStep Runat="server". </asp:CreateUserWizardStep>. <asp:CompleteWizardStep Runat="server". </asp:CompleteWizardStep>. BorderWidth="1px"></StepStyle>. ForeColor="White"></TitleTextStyle>. </asp:CreateUserWizard>. pc.FirstName = Firstname.Text;. pc.LastName = Lastname.Text;. pc.Age = Age.Text;. pc.Save();. You can define a custom step...
tailieu.vn Xem trực tuyến Tải xuống
Listing 16-13: Providing a login for the end user using the Login control. runat="server">. <asp:Login ID="Login1". Runat="server">. </asp:Login>. In the situation established here, if the unauthenticated user hits a different page in the application, he is redirected to the Login.aspx page. You can see how ASP.NET tracks the location in the URL from the address bar in the browser:. http://localhost:18436/Membership/Login.aspx?ReturnUrl=%2fMembership%2fDefault.aspx...
tailieu.vn Xem trực tuyến Tải xuống
<head runat="server">. runat="server">. <asp:LoginStatus ID="LoginStatus1". <p><asp:LoginName ID="LoginName1". <p>There are <asp:Label ID="Label1". users online.</p>. <script runat="server">. When the page is generated, it displays the number of users who have logged on in the last 15 minutes.. An example of what is generated is shown in Figure 16-14.. Figure 16-14. You can see that two users have logged on in the last...
tailieu.vn Xem trực tuyến Tải xuống
The role management service defines its settings from within the machine.config.comments file, as shown in the previous code listing. You can make changes to these settings either directly in the. machine.config file or by overriding any of the higher level settings you might have by making changes in the web.config file (thereby making changes only to the application at hand).....
tailieu.vn Xem trực tuyến Tải xuống
<script runat="server">. <head runat="server">. runat="server">. <asp:TextBox ID="TextBox1". Runat="server"></asp:TextBox>. <asp:Button ID="Button1". <p><asp:GridView ID="GridView1". Runat="server">. </asp:GridView></p>. By default, after you retrieve a user’s roles from the data store underlying the role management service, you can store these roles as a cookie on the client machine. You can deal with this role cookie in several ways — some of which might help to...
tailieu.vn Xem trực tuyến Tải xuống
directly in the code, or you can create the zones within the table by dragging and dropping WebPartZone controls onto the design surface at appropriate places within the table. In Figure 17-4, the table border width is intentionally turned on and set to 1 in order to show the location of the Web zones in greater detail. Figure 17-5 shows...
tailieu.vn Xem trực tuyến Tải xuống
Figure 17-9. The Design option in the drop-down list changes the page so that the user can see the zones defined on the page, as illustrated in Figure 17-10.. At this point, the end user can select one of the Web Parts contained in one of these zones and either change its order in the zone or move it to...
tailieu.vn Xem trực tuyến Tải xuống
control allows you to control these verbs by nesting the appropriate verb ele-. After these are in place, you can manipulate how these items appear in all the Web Parts that appear in the chosen Web Part Zone.. For example, look at graying out the default Close link included with a Web Part. Listing 17-11: Graying out the Close link...
tailieu.vn Xem trực tuyến Tải xuống
Controls.Add(InstructionText);. Controls.Add(LineBreak);. Controls.Add(StateInput);. Controls.Add(InputButton);. Controls.Add(Spacer);. Controls.Add(StateContents);. This constructor creates a control that explicitly sets the control’s AllowClose property to False — mean- ing that the Web Part will not have a Close link associated with it when generated in the page. Now that the custom Web Part control is in place, build the project so that a DLL is created....
tailieu.vn Xem trực tuyến Tải xuống
runat="server">. ProviderConnectionPointID="TextBoxStringProvider">. </asp:WebPartConnection>. </asp:WebPartManager>. <asp:WebPartZone ID="WebPartZone1". Title="Provider Web Part". </asp:WebPartZone>. <asp:WebPartZone ID="WebPartZone2". Title="Consumer Web Part". This ASP.NET page that utilizes Web Parts contains a single two-cell table. Each cell in the table contains a single WebPartZone control — WebPartZone1 and WebPartZone2. Before connecting the Web Parts, the new custom Web Part controls are registered in the ASP.NET page using the...
tailieu.vn Xem trực tuyến Tải xuống
The Selector is the portion of the rule that dictates exactly how the Web browser should select the elements to apply the style to. The Universal Selector indicates that the style should apply to any element in the Web page. The sample that follows shows a Universal Selector, which would change the font of any element that supports the font-family...
tailieu.vn Xem trực tuyến Tải xuống
Figure 18-7 shows how all of these elements are combined to form the box.. Figure 18-7. All of the separate elements that make up the box can influence its position within the Web page, and unless otherwise specified, each is given a default value of zero. The height and width of the element is equal to the height and width...
tailieu.vn Xem trực tuyến Tải xuống
Once you have entered the Selector you want to use and chosen a location to define the style, you can begin to set the styles properties. Visual Studio 2008 introduces three new tool windows you can use to manage style sheets, apply styles to elements, and easily inspect the style properties applied to an element.. Manage Styles Tool Window. The...
tailieu.vn Xem trực tuyến Tải xuống
Figure 19-3. Figure 19-4. ASP.NET AJAX and V isual Studio 2008. Prior to Visual Studio 2008, the ASP.NET AJAX product used to be a separate installation that you were required to install on your machine and the Web server that you were working with. Not only is it a part of the Visual Studio 2008 IDE, the ASP.NET AJAX product...
tailieu.vn Xem trực tuyến Tải xuống
When you click the AJAX button, the time in Label1 will not change at all, as it is outside of the UpdatePanel. A screenshot of the final result is presented in Figure 19-10.. When you first pull up the page from Listing 19-4, the code of the page is quite different from the page that was built without using AJAX....
tailieu.vn Xem trực tuyến Tải xuống
<title>UpdatePanel Control</title>. <form id="form1". <asp:ScriptManager ID="ScriptManager1". </asp:ScriptManager>. <asp:UpdatePanel ID="UpdatePanel1". <ContentTemplate>. <asp:Label ID="Label1". runat="server"></asp:Label>. <asp:Button ID="Button1". </ContentTemplate>. </asp:UpdatePanel>. In this case, the Label and Button server controls are contained within the UpdatePanel server con- trol. The <asp:UpdatePanel>. <Triggers>. should be contained within the <ContentTemplate>. section of the UpdatePanel control.. By default, any type of control trigger (something that would normally trigger...
tailieu.vn Xem trực tuyến Tải xuống
Chapter 19: ASP.NET AJAX. Now that both of the UpdatePanel controls are set to have an UpdateMode of Conditional , when running this page, you will see the results presented in Figure 19-15.. ASP.NET AJAX, although it is in its infancy, is an outstanding technology and will fundamentally change the way Web application development is approached. This chapter took a...
tailieu.vn Xem trực tuyến Tải xuống
<asp:TextBox ID="TextBox1". runat="server"></asp:TextBox>. <asp:TextBox ID="TextBox2". <asp:TextBox ID="TextBox29". <asp:TextBox ID="TextBox30". <asp:Panel ID="Panel1". runat="server">. <asp:Button ID="Button1". <asp:Button ID="Button2". </asp:Panel>. <script runat="server">. This code presents a very long form that requires end users to scroll the page in their browser. The AlwaysVisibleControlExtender control is present and its presence requires that you also have a Script- Manager control on the page (this is the...