Displaying XML Files with ASP.NET 2.0
发表于2004/9/29 12:36:00 619人阅读
[ Run Sample ]
Displaying XML documents in web pages is a task that web developers perform on a regular basis. Using the XML web server control in ASP.NET 2.0 makes displaying XML data enjoyable. You can easily load different XSLT style sheets to show the same XML file in different ways.
This example uses a web page that contains both a DropDownList and an XML web server control to display an XML file (Authors.xml) using one of three different XSLT style sheets. When a selection is made from the DropDownList the SelectedIndexChanged event fires and the XML control's TransformSource property is set to the proper XSLT style sheet for the selected view.
There are three views to choose from:
- Authors Phone List Blue (Authors1.xslt)
- Authors Address List (Authors2.xslt)
- Authors Phone List Green (Authors3.xslt)
All of the views display the Authors.xml file in a different format. The only difference between the two phone lists is the back ground color.
The source code can also be viewed on the sample page. Hopefully this example will give you some ideas on how to display XML files using the ASP.NET XML web server control.
Beginning ASP.NET 2.0 with C# Part 2
bigbigdai 2008-02-25 11:02 43
asp.net 2.0 xml高级编程+源码
tiantangwater 2008-12-20 11:17 133
ASP.NET 2.0 XML 高级编程 part2
cnfangbo 2008-03-04 09:52 146
Learning ASP.NET 2.0 with AJAX A Practical Hands-on Guide.pdf
jazz2013 2013-03-27 20:55 1
jackyrongvip 2013-07-01 17:24 391
Beginning ASP.NET 2.0.with C# Part 1
bigbigdai 2008-02-25 10:56 42
轻松加密ASP.NET 2.0 Web程序配置信息
hailiannanhai 2011-05-23 15:00 480
Learning ASP.NET 2.0 with AJAX PDF
quluzheng 2010-11-03 21:34 7