asp.net 3.5

How to create secure web applications in ASP.NET

You should always keep the following guidelines in mind when writing code in terms of web applications:

Never trust user input – Assume that every user is evil, until you have confirmed the opposite. You should always strongly validate user input. Write your validation code in a way that it verifies input against …

Learn more

How to use XSLT with TreeView to make XML hierarchical data binding in ASP.NET

In the article How to use TreeView to make XML hierarchical data binding in ASP.NET is shown how you can use XmlDataSource and TreeView control together to make hierarchical data binding. In addition XmlDataSource has built-in support for XSL transformations. You can use it to convert the source XML document into an XML structure that’s easier …

Learn more

How to use TreeView to make XML hierarchical data binding in ASP.NET

Some controls in .NET, like TreeView, have the built-in smarts to show hierarchical data. When you bind the TreeView to an XmlDataSource, it uses the XmlDataSource.GetHierarchicalView() method and displays the full structure of the XML document.

The next XML file named BooksList.xml is used as example:

 

<?xml version=”1.0″ encoding=”utf-8″?>

<BooksList>

<Book ISBN-13=”978-0545139700″>

<Title>Harry Potter and the Deathly …

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 XML document with XDocument class in C#

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 show XML with nested grids

When you have to deal with much more complex XML structures you can show nested elements by nesting one grid control inside another. The remarkable part is that ASP.NET provides support for this approach without requiring you to write any code. The next example uses nested grids to create a list of books, with a separate …

Learn more

How to use XPath to make XML data binding

If you implement approach described in the article How to make XML nonhierarchical data binding, you can display only attributes values. You can get the text from nested elements by using XPath data binding expressions.

You can do this by using a template that defines XPath data binding expressions.  XPath data binding expressions are similar …

Learn more

How to make XML nonhierarchical data binding

If for your project hierarchical nature of XML data is not important you can ignore it. In this case, you can bind the XML data source directly to an ordinary grid control such as the Grid View, by following the next steps:

1. You should define the XML data source …

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