XML Navigation in Asp.Net
-
Hi I have a xml file like, " Books Book ID="001" Author Mark /Author Publisher Sams /Publisher /Book Book ID="002" Author Joe /Author Publisher AWL /Publisher /Book Book ID="003" Author James /Author Publisher Spect /Publisher /Book Book ID="004" Author Thomos /Author Publisher McHill /Publisher /Book /Books " My form has Three Text boxes to display BookId,Author and Publisher and also four Buttons with names First, Next, Previous and Last resp. Now what my question is I want to get the data from xml file and display in textboxes for the respective button events without using any dataset by using Xml Objects. It may be looks simple for someone, I'm new to XML Thanks Hari
-
Hi I have a xml file like, " Books Book ID="001" Author Mark /Author Publisher Sams /Publisher /Book Book ID="002" Author Joe /Author Publisher AWL /Publisher /Book Book ID="003" Author James /Author Publisher Spect /Publisher /Book Book ID="004" Author Thomos /Author Publisher McHill /Publisher /Book /Books " My form has Three Text boxes to display BookId,Author and Publisher and also four Buttons with names First, Next, Previous and Last resp. Now what my question is I want to get the data from xml file and display in textboxes for the respective button events without using any dataset by using Xml Objects. It may be looks simple for someone, I'm new to XML Thanks Hari
The easiest way to do this would be to load the Xml into an XmlDocument, use SelectNodes to get a collection of nodes that represent each book, and then build the buttons from there. An intermediate class that represents a book may be useful, too.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
The easiest way to do this would be to load the Xml into an XmlDocument, use SelectNodes to get a collection of nodes that represent each book, and then build the buttons from there. An intermediate class that represents a book may be useful, too.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
I say when use a master page in my application. then application not execute in localhost (IIS). I am trying to execute the application then display the error: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A name was started with an invalid character. Error processing resource 'http://localhost/Mcp1/Forms/Default2.aspx'. Line ... <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="...
-
I say when use a master page in my application. then application not execute in localhost (IIS). I am trying to execute the application then display the error: The XML page cannot be displayed Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. -------------------------------------------------------------------------------- A name was started with an invalid character. Error processing resource 'http://localhost/Mcp1/Forms/Default2.aspx'. Line ... <%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="...
Yeah, you said that on anothe thread entirely... Looks to me like ASP.NET 2.0 is not set up on your machine.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )