Parsing XSLT page in ASP.NET

I have a kind of simple shopping cart with radio buttons and a button. Moreover I have a XML page and XSLT page. What I want to do is when the user selects one of the radio buttons, I want to parse the price from associated XSLT page and calculate that with quantity that will entered when he is selecting the item.Here is code for that page:\[code\]<body> <form id="form1" runat="server"> <div> <asp:Label ID="Label1" runat="server" style="font-weight: 700" Text="Please Select a Item:"></asp:Label> <br /> <br /> <asp:RadioButton ID="RadioButton1" runat="server" Text="Tyres" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:RadioButton ID="RadioButton2" runat="server" Text="Front Glass" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:RadioButton ID="RadioButton3" runat="server" Text="Vanity Mirror" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:RadioButton ID="RadioButton4" runat="server" Text="Brake Pads" />&nbsp;&nbsp;&nbsp; <asp:RadioButton ID="RadioButton5" runat="server" Text="Brake Oil" /> <br /> <br /> <asp:Label ID="Label2" runat="server" style="font-weight: 700" Text="Quantity: "></asp:Label> <asp:TextBox ID="TextBox1" runat="server" Width="61px"></asp:TextBox> <br /> <br /> <asp:Button ID="Button1" runat="server" Text="Confirm" /> </div> </form></body>\[/code\]And here is the XML and XSLT page (shopping_cart.xml & shopping_cart.xslt)xml:\[code\]<?xml version="1.0" encoding="utf-8" ?><cart> <item id="1"> <name>Tyres</name> <cost>20</cost> </item> <item id="2"> <name>Front Glass</name> <cost>30</cost> </item> <item id="3"> <name>Vanity Mirror</name> <cost>10</cost> </item> <item id="4"> <name>Brake Pads</name> <cost>50</cost> </item> <item id="5"> <name>Brake Oil</name> <cost>40</cost> </item></cart>\[/code\]xslt:\[code\]<?xml version="1.0" encoding="utf-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"> <xsl:output method="xml" indent="yes"/> <xsl:template match="shopping_cart"> <root> <xsl:apply-templates select="cart"/> </root> </xsl:template> <xsl:template match="cart"> <cart> <xsl:attribute name="name"> <xsl:value-of select="name"/> </xsl:attribute> <xsl:attribute name="cost"> <xsl:value-of select="cost"/> </xsl:attribute> </cart> </xsl:template></xsl:stylesheet>\[/code\]I am total newbie to the parsing stuff, can anyone guide me how can I do it?
 
Back
Top