Có 120+ tài liệu thuộc chủ đề "chủ đề và giao diện"
tailieu.vn Xem trực tuyến Tải xuống
<html xmlns="http://www.w3.org/1999/xhtml">. <head runat="server">. <form id="form1". runat="server">. <div>. <asp:ScriptManager ID="ScriptManager1". </asp:ScriptManager>. <cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1". ConfirmText="Are you sure you wanted to click this button?">. <asp:Button ID="Button1". </div>. Figure 20-15. DisplayModalPopupID="ModalPopupExtender1">. <cc1:ModalPopupExtender ID="ModalPopupExtender1". TargetControlID="Button1">. <asp:Panel ID="Panel1". padding:20px;">. <asp:Button ID="ButtonYes". <asp:Button ID="ButtonNo". </asp:Panel>. In this case, it points to the ModalPopupExtender1 control — another extender control.. Figure 20-16. Listing 20-10: Dragging a Panel control...
tailieu.vn Xem trực tuyến Tải xuống
Dim myGrid As New GridView myGrid.ID = "GridView1". myGrid.ID = "GridView1";. The GetDynamicContent() method takes a single parameter, contextKey , a string value that can be used to determine what link the end user clicked.. The client will take the large string and use the text to populate the Panel1 control that is on the page. The result of clicking...
tailieu.vn Xem trực tuyến Tải xuống
In the example is Listing 20-20, all the check boxes share a Key value of MyCheckboxes. When you select one of the check boxes, a check mark appears. The NumericUpDownExtender control allows you to put some up/down indicators next to a TextBox control that enable the end user to more easily control a selection.. A simple example of this is...
tailieu.vn Xem trực tuyến Tải xuống
<title>SlideShowExtender Control</title>. <form id="form1". runat="server">. <asp:ScriptManager ID="ScriptManager1". </asp:ScriptManager>. <asp:Panel ID="Panel1". HorizontalAlign="Center">. <cc1:SlideShowExtender ID="SlideShowExtender1". ImageDescriptionLabelID="LabelDescription">. </cc1:SlideShowExtender>. <asp:Label ID="LabelTitle". Font-Bold="True"></asp:Label><br /><br />. <asp:Image ID="Image1". /><br />. <asp:Label ID="LabelDescription". Text="Label"></asp:Label><br /><br />. <asp:Button ID="ButtonPrevious". <asp:Button ID="ButtonNext". <asp:Button ID="ButtonPlay". </asp:Panel>. Listing 20-29: The GetSlides method implementation. As AjaxControlToolkit.Slide(). Return New AjaxControlToolkit.Slide. New AjaxControlToolkit.Slide("Images/Creek.jpg",. New AjaxControlToolkit.Slide("Images/Dock.jpg",. New AjaxControlToolkit.Slide("Images/Garden.jpg",. return new AjaxControlToolkit.Slide[]. new AjaxControlToolkit.Slide("Images/Creek.jpg",. new AjaxControlToolkit.Slide("Images/Dock.jpg",....
tailieu.vn Xem trực tuyến Tải xuống
Figure 20-42. NoBot Control. The NoBot control is illustrated in Listing 20-36.. Listing 20-36: Using the NoBot control to limit a login form. <html xmlns="http://www.w3.org/1999/xhtml">. <head runat="server">. <title>NoBot Control</title>. <form id="form1". runat="server">. <asp:ScriptManager ID="ScriptManager1". </asp:ScriptManager>. <cc1:NoBot ID="NoBot1". runat="server". <asp:Login ID="Login1". </asp:Login>. <asp:Label ID="Label1". runat="server"></asp:Label>. The ResponseMinimumDe- laySeconds property defines the minimum number of seconds the end user has to submit...
tailieu.vn Xem trực tuyến Tải xuống
As you can see, a couple of methods are at your disposal for building an authentication/authorization model for your ASP.NET applications. Windows-Based Authentication. This type of authentication is quite useful in an intranet environment where you can let the server deal completely with the authentication process — especially in environments where users are already logged onto a network. IIS first...
tailieu.vn Xem trực tuyến Tải xuống
slidingExpiration Specifies whether to apply a sliding expiration to the cookie. If set to True , the expiration of the cookie is reset with each request made to the server. After the web.config file is in place, the next step is to create a typical page for your application that people can access. Listing 21-4 presents a simple page.. Listing...
tailieu.vn Xem trực tuyến Tải xuống
IsInRole : This method takes a single parameter, a string representation of the system role. It returns a Boolean value that indicates whether the user is in the role specified.. Working with User.Identity. The User.Identity property enables you to work with some specific contextual information about the authorized user. Using the property within your ASP.NET applications enables you to make...
tailieu.vn Xem trực tuyến Tải xuống
Highlight .aspx in the list of mappings and click the Edit button. Figure 21-16 shows the result.. In the Executable text box, you can see that all .aspx pages map to the aspnet_isapi.dll from ASP.NET, and that you can also specify which types of requests are allowed in the application. You can allow either all verbs (for example, GET or...
tailieu.vn Xem trực tuyến Tải xuống
The Page has a public property aptly named Session that automatically retrieves the Session from the current HttpContext . Even though it seems as if the Session object lives inside the page, it actually lives in the HttpContext , and the page’s public Session property actually retrieves the reference to the session state. The Session object can be referred to...
tailieu.vn Xem trực tuyến Tải xuống
Figure 22-4. Listing 22-5: A serializable object that can be used in the out-of-process Session. return String.Format("Person Object firstName, lastName);. Because you put an instance of the Person class from Listing 22-5 into the Session object that is currently configured as StateServer , you should add a strongly typed property to the base Page class from Listing 22-3. In Listing...
tailieu.vn Xem trực tuyến Tải xuống
The Session is lost if an absolute URL such as /myapp/retrieve.aspx is invoked. If you are generat- ing URLs on the server side, use HttpResponse.ApplyAppPathModifier. Response.Write(Response.ApplyAppPathModifier("foo/bar.aspx"));. The previous line generates a URL similar to the following:. /myapp/ (S(avkbnbml4n1n5mi5dmfqnu45))/foo/bar.aspx. Notice that not only was session information added to the URL, but it was also converted from a relative URL to an...
tailieu.vn Xem trực tuyến Tải xuống
The Items collection holds objects, just like many of the collections that have been used in this chapter.. CType(HttpContext.Current.Items(key), MyData) If d Is Nothing Then. ’Go to the Database, do whatever.... HttpContext.Current.Items(key. MyData d = (MyData) HttpContext.Current.Items[key];. //Go to the Database, do whatever.... HttpContext.Current.Items[key. This code checks the Items collection of the current HttpContext to see if the data is...
tailieu.vn Xem trực tuyến Tải xuống
Add the lines from Listing 23-3 to your Page_Load to influence the Response’s headers and the caching behavior of the browser. ByVal e As System.EventArgs) Handles Me.Load. Response.Cache.SetCacheability(HttpCacheability.NoCache) Response.Cache.SetNoStore(). Response.Cache.SetExpires(DateTime.MinValue) Response.Write(DateTime.Now.ToLongTimeString. Response.Cache.SetCacheability(HttpCacheability.NoCache);. Response.Cache.SetNoStore();. Response.Cache.SetExpires(DateTime.MinValue);. Compare the results of running Listing 23-3 in the before Figure 23-2 and then in the after Figure 23-3. Two new HTTP headers have been injected...
tailieu.vn Xem trực tuyến Tải xuống
Enabling the table for SQL cache dependency.. After the table is enabled, you can begin using the SQL cache invalidation features. However, before you do, the following section shows you what happens to SQL Server when you enable these features.. Looking at SQL Server 2000. Now that the Northwind database and the Customers and Products tables have all been enabled...
tailieu.vn Xem trực tuyến Tải xuống
In this example, the SqlCacheDependency class associated itself to the Customers table in the Northwind database as before. This time, however, you use the Cache object to insert the retrieved dataset along with a reference to the SqlCacheDependency object. The Insert method of the Cache class is constructed as follows:. dependencies As System.Web.Caching.CacheDependency). You can also insert more information about...
tailieu.vn Xem trực tuyến Tải xuống
Request Details Includes the ASP.NET Session ID, the character encoding of the request and response, and the HTTP conversation’s returned status code. Be aware of the request and response encoding, especially if you’re using any non-Latin character sets. If you’re returning languages other than English, you’ll want your encoding to be UTF-8. Trace Information Includes all the Trace.Write methods called...
tailieu.vn Xem trực tuyến Tải xuống
<system.diagnostics>. </system.diagnostics>. Switches can be used in an if statement for any purpose, but they are most useful in the context of tracing along with System.Diagnostics.Trace.WriteIf. System.Diagnostics.Trace.WriteIf(aSwitch.Enabled, "The Switch is enabled!") C#. System.Diagnostics.Trace.WriteIf(aSwitch.Enabled, "The Switch is enabled!");. System.Diagnostics.Trace.WriteIf(tSwitch.TraceInfo, "The Switch is 3 or more!") C#. System.Diagnostics.Trace.WriteIf(tSwitch.TraceInfo, "The Switch is 3 or more!");. A number of properties on the TraceSwitch class...
tailieu.vn Xem trực tuyến Tải xuống
During an interactive debugging session, Visual Studio now strives to assist you with informative Error Notifications. Figure 24-15. Although this has a large number of developers cheering, unfortunately this feature is not available to ASP.NET developers.. In ASP.NET, your assembly is compiled not by Visual Studio, but by the ASP.NET runtime using the same technique it does during a normal...
tailieu.vn Xem trực tuyến Tải xuống
The System.IO namespace within the .NET Framework makes working with file system directories and files very easy.. While working with the classes in the System.IO namespace, keep in mind that because your ASP.NET applications are executing on the server, the file system you are accessing is the one your Web application is running on. You can start working with the...