vb.net

How to hash ASP.NET Forms Authentication passwords in web.config in VB.NET

Forms authentication offers the possibility of storing the password in different formats. In the <credentials /> configuration section of the <forms /> element, the format of the password is specified through the passwordFormat attribute, which has three valid values:

–  Clear – The passwords are stored as clear text in the <user /> …

Learn more

How to create a Forms Authentication logout page in ASP.NET in VB.NET

You can create a Forms Authentication logout page by creating a logout button and calling the FormsAuthentication.SignOut() method, as shown here:

Protected Sub SignOutAction_Click(sender As Object, e As EventArgs)

FormsAuthentication.SignOut()

FormsAuthentication.RedirectToLoginPage()

End Sub

When you call the SignOut() method, you remove the authentication cookie. Depending on the application, you can redirect …

Learn more

How to create a Forms Authentication custom login page in ASP.NET in VB.NET

When you want to implement Forms Authentication in your web application you have to create a custom login page. This page collects user name and password from the user and validates them against the credentials stored in the credential store. You can store credentials in web.config as described in the article How to use web.config as …

Learn more

How to validate XML document with XDocument class in VB.NET

When you want to validate an XML document against a schema, by using XDocument you need to import the System.Xml.Schema namespace. In this way you can use validation classes which XDocument class doesn’t have. The imported namespace contains an Extensions class that include a Validate() method you can use on an XElement or XDocument.

Note: You can …

Learn more

How to validate an XML document with XML Schemas in VB.NET

You can validate an XML document against a schema, by using built in XmlReader’s validation features. Note: You can find more details about XML schemas from the article How to use XML Schemas in XML document.  You can follow the next steps when performing validation:

1. You need to import the System.Xml.Schema …

Learn more

How to transform XML with LINQ to XML in VB.NET

You can find from the articles: How to use XSL to transform XML content, How to use XslCompiledTransform class to transform XML file in VB.NET, and How to use Xml control to transform XML file to HTML output different ways to change the representation of XML. Although XSL will still continue to be used in a …

Learn more

How to use XslCompiledTransform class to transform XML file in VB.NET

If you want to transform XML file into formatted HTML you can use combination of stylesheet and the XslCompiledTransform class (contained in the System.Xml.Xsl namespace). Note: In the next example will be used stylesheet explained in the article How to use XSL to transform XML content. The next code performs this transformation and saves the result …

Learn more

How to search XML content with XPath in VB.NET

The GetElementsByTagName() method illustrated in the article How to search XML content with XmlDocument in VB.NET is fairly limited. It allows you to search based on the name of an element only. You can’t filter based on other criteria, such as the value of the element or attribute content. In these cases you can use XPath …

Learn more

How to search XML content with XmlDocument in VB.NET

You can perform a search with the XmlDocument by using  XmlDocument.GetElementsByTagName() method, which  searches an entire document tree for elements that have a specific name and returns an XmlNodeList that contains all the matches as XmlNode objects.

For example, the following code retrieves the title of each Book in the document:

 

‘ Load the XML file.

Dim XmlFile As …

Learn more

How to use XML Namespaces with XNamespace class in VB.NET

You can use the XNamespace class to create XML content that uses a namespace. You can find more information about XML namespaces from the article How to use XML Namespaces in XML document. When you want to use XNamespace class you should define an XNamespace object first. Then you should add this XNamespace object to the …

Learn more