« Home « Chủ đề thao tác với Javascript

Chủ đề : thao tác với Javascript


Có 80+ tài liệu thuộc chủ đề "thao tác với Javascript"

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

tailieu.vn

Then it executes the SQL command and retrieves the XML data into an XmlReader . An XPathNavigator is created from the XmlDocument , and a child node is prepended to the document. A single call to the WriteNode method of the XmlWriter retrieved from the XPathDocument moves the entire XML fragment into the well-formed XmlDocument . Then, for this example,...

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

tailieu.vn

Internet Information Services 7.0 (IIS7) is the latest version of Microsoft’s Web Server. The most notable change for ASP.NET developers is the deep integration of IIS7 and the ASP.NET Framework. This provides both ASP.NET developers and IIS7 administrators with an integrated programming environment that allows them to implement features and functionalities that were not possible before. This chapter will provide...

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

tailieu.vn

Figure 11-3. Command-Line Setup Options. Windows Vista and Windows Server 2008 come with a new command line tool named pkgmgr.exe that you can use to custom install IIS7. The following table describes the available options on this command-line tool:. Notice that the update list contains a semi-colon separated list of the update names discussed in the previous sections.. Notice that...

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

tailieu.vn

The new IIS7 and ASP.NET 3.5 integrated configuration system consists of a hierarchy of configuration files where lower-level configuration files inherit the configuration settings from higher level configura- tion files. The lower-level configuration files can override only those inherited configuration settings that are not locked in the higher level configuration files.. In this section, you’ll learn how the IIS Manager...

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

tailieu.vn

The ASP.NET provider model is an important framework to understand as you build your applications. The ASP.NET provider model was a major change introduced in ASP.NET 2.0, so you probably already know that ASP.NET is a way to build applications for the Internet. ASP.NET works with a disconnected architecture. On top of that, ASP.NET does not differentiate one request from...

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

tailieu.vn

type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a". </system.web>. With these changes in place, the SQL Server 2005 instance is now one of the providers available for use with your applications. You can see that this instance also uses the connection string of LocalSql2005Server , which was defined in Listing 12-1.. Pay attention to some important attribute declarations from Listing 12-2. The first...

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

tailieu.vn

For instance, if you are connecting to a SQL Server 2005 database, you define your connection in the web.config and then associate your SqlProfileProvider declaration to this connection string. This scenario is presented in Listing 12-12.. Listing 12-12: Connecting the SqlProfileProvider to SQL Server 2005. <add name="LocalSql2005Server". <system.web>. <add name="AspNetSql2005ProfileProvider". type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0, Culture=neutral,. <add name="FirstName". <add name="LastName". <add name="LastVisited"....

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

tailieu.vn

</system.web>. In this example, the errors that occur are captured and not only written to the event log, but are also e-mailed to the end users specified in the provider definition. One very interesting point of the Simple- MailWebEventProvider is that this class inherits from the BufferedWebEventProvider instead of from the WebEventProvider as the EventLogWebEventProvider does. System.Web.Management.TemplatedMailWebEventProvider. Just like the...

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

tailieu.vn

Extending the Provider Model. The last chapter introduced the provider model found in ASP.NET 3.5 and explained how it is used with the membership and role management systems.. As discussed in the previous chapter, these systems in ASP.NET 3.5 require that some type of user state be maintained for long periods of time. Out of the box, ASP.NET 3.5 gives...

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

tailieu.vn

Imports Microsoft.VisualBasic Imports System.Xml. Imports System.Configuration.Provider Imports System.Web.Hosting. Imports System.Collections. Imports System.Collections.Generic Public Class XmlMembershipProvider. Public Overrides Property ApplicationName() As String Get. Public Overrides Function ChangePassword(ByVal username As String. ByVal oldPassword As String, ByVal newPassword As String) As Boolean End Function. Public Overrides Function ChangePasswordQuestionAndAnswer(ByVal username _ As String, ByVal password As String, ByVal newPasswordQuestion As String. ByVal newPasswordAnswer As...

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

tailieu.vn

One of the more important features of the membership provider is that it validates users (it authenticates them). The validation of users is accomplished through the ASP.NET Login server control. This control, in turn, makes use of the Membership.ValidateUser() method that ends up using the ValidateUser() method in the XmlMembershipProvider class.. Now that the Initialize() method and private variables are...

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

tailieu.vn

Remember that you have to define the provider to use in your application by providing a value for the defaultProvider attribute and defining that provider further in the <provider>. element, you can add a provider instance that makes use of the LimitedSqlRole- Provider class. Because this provider derives from the SqlRoleProvider class, you must use some of the same attributes...

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

tailieu.vn

Figure 14-4. With the use of the PathSeparator attribute or the <PathSeparatorTemplate>. element, it is quite easy to specify what you want to use to separate the links in the breadcrumb navigation, but you might also want to give this pipe some visual style as well. node to your SiteMapPath control. ">. BackColor="#cccc66"></PathSeparatorStyle>. element with the SiteMapPath control, we are...

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

tailieu.vn

encoding="utf-8"?>. <Item Category="Motherboards">. <Option Choice="Asus". <Option Choice="Abit". <Item Category="Memory">. <Option Choice="128mb". <Option Choice="256mb". <Option Choice="512mb". <Item Category="HardDrives">. <Option Choice="40GB". <Option Choice="80GB". <Option Choice="100GB". <Item Category="Drives">. <Option Choice="CD". <Option Choice="DVD". <Option Choice="DVD Burner". As you can see, this list is not meant to be used for site navigation purposes, but instead for allowing the end user to make a selection from...

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

tailieu.vn

Look in the folder — it is interesting to see what is output by the tool.. Working with the TreeView Control Programmatically. The great thing about ASP.NET is that you are not simply required to work with its components declaratively, but you can also manipulate these controls programmatically.. The next section looks at how to use some of the more...

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

tailieu.vn

Adding styles to the dynamic items of the menu control is just as easy as adding them to static items.. The Menu control has a number of different elements for modifying the appearance of dynamic items, including the following:. Listing 14-19 shows an example of apply- ing the hover style to dynamic items.. Listing 14-19: Adding a hover style to...

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

tailieu.vn

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Label1.Text = SiteMap.CurrentNode.Description &. SiteMap.CurrentNode.HasChildNodes &. SiteMap.CurrentNode.NextSibling.ToString() &. SiteMap.CurrentNode.ParentNode.ToString() &. SiteMap.CurrentNode.PreviousSibling.ToString() &. SiteMap.CurrentNode.RootNode.ToString() &. SiteMap.CurrentNode.Title &. SiteMap.CurrentNode.Url End Sub. Label1.Text = SiteMap.CurrentNode.Description + "<br>". SiteMap.CurrentNode.HasChildNodes + "<br>". SiteMap.CurrentNode.NextSibling.ToString. SiteMap.CurrentNode.ParentNode.ToString. SiteMap.CurrentNode.PreviousSibling.ToString. SiteMap.CurrentNode.RootNode.ToString. SiteMap.CurrentNode.Title + "<br>". SiteMap.CurrentNode.Url;. /SiteNavigation/Markets.aspx. Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Hyperlink1.Text = SiteMap.CurrentNode.ParentNode.ToString(). Hyperlink1.NavigateUrl...

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

tailieu.vn

Listing 14-34: Locking down the AdminOnly.aspx page in the web.config. <system.web>. </system.web>. Now, because the AdminOnly.aspx page is accessible only to the users who are in the Admin role, the next step is to allow users to login to the application. This simple ASP.NET page is presented in Listing 14-35.. Listing 14-35: The Default.aspx page. With the Default.aspx page in...

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

tailieu.vn

</p>. Profile.FirstName = TextBox1.Text;. Profile.LastName = TextBox2.Text;. Profile.Age = TextBox3.Text;. Profile.Member = Radiobuttonlist1.SelectedItem.Text;. "First name: ". Profile.FirstName. "<br>Last name: ". Profile.LastName. Profile.Age. Profile.Member. Profile.LastVisited;. All items stored by the personalization system are type cast to a particular .NET data type. To store an item, you simply populate the personalization property directly using the Profile object:. Profile.FirstName = TextBox1.Text. To retrieve...

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

tailieu.vn

Listing 15-11: Setting an anonymous cookie in the HTTP header HTTP/1.1 200 OK. From this HTTP header, you can see that a cookie — .ASPXANONYMOUS — is set to a hashed value for later retrieval by the ASP.NET personalization system.. Changing the Name of the Cookie for Anonymous Identification. You can change the name of this cookie from the <anonymousIdentification>....