xmldatasource

Display data from XMLDataSource in TextBox

Can anyone give me some pointers on how to display the results of an XPath query in a textbox using code (C#)? My datascource seems to (re)bind correctly once the XPath query has been applied, but I cannot find how to get at the resulting data. Any help would be greatly appreciated. ...

ASP.NET -- How to populate a TreeView control with XML data response from a ASHX handler

I have an ASHX handler that returns an XML response (FileStructureXML.ashx). Now I need to get the XML response from the ASHX handler and use it as a data source for my ASPX page. If I point the XMLDataSource to a static XML file on the server, the treeview populates as expected. However, if I point the XMLDataSource to the ASHX handl...

Master/Details view with XmlDataSources

Hi, I have a basic test web form with a DataList and a DetailsView and two XmlDataSource components for each of them. The binding of the DataList to the underlying XML document was easy to set up, but I'm struggling with getting the DetailsView hooked up. The idea is that there is a master/details relationship between the two bindable ...

How relevent is xls file for .NET developer?

Once in a while, we use .XLS file to convert the data stored in the XML file and populate some dropdownlist and other server controls using XmlDataSource object. I am just wondering how popular is the use of the.XLS file in the .Net proejcts? We have used to populate countries list and state list and other huge amount of the project spec...

Seeking Advice: Updating a FormView Based on DropdownList Value

Greetings! I'm looking for some advice regarding an approach to displaying data in a FormView based on a selection of a DropDownList within that FormView control. For example, I have a UserControl with the following: <asp:XmlDataSource ID="xdsMyXmlData" runat="server" EnableCaching="false" XPath="Root/Membership" /> <asp:FormView ID="...

Bind XMLDataSource to HTTP handler

Hi I have some dynamically generated XML data that will be consumed by a few consumers (An ASPX page, a flash file and maybe another one as well). I have implemented it as a custom handler. I construct the XML in the handler and output it using response.write. Now If I set the DataFile property of my XMLDataSource to the handler, it ...

Transform Xml using Xslt

Hello, I have the following XML: <?xml version="1.0" encoding="utf-8" ?> <ApplicationSettingCategories> <Category>Cat1</Category> <Category>Cat2</Category> <Category>Cat3</Category> <Category>Cat4</Category> <Category>Cat5</Category> <Category>Cat6</Category> </ApplicationSettingCategories> I am trying to bind this Xml to a Dr...

show page in iframe with different url in browser

Hello I apologize because my English is not good. I Have a webpage by asp.net that contain one treeview ,xmldatasource,one xml file that related to xmldatasource and one iframe. When user click on a treenode a webpage will be shown in iframe. Now I want when treenodes clicked , my url (e.g "www.mysite.com/default.aspx") change to...

Load XML Data (Key/Value Pairs) into Data Structure

I have an XML Data Source which contains a list of key/value pairs. I'm looking for a simple way to load the same data into an array or some other data structure so that I can easily look up the data. I can bind it to a GridView with a couple of clicks but I'm failing to find a straightforward way to load it into something that isn't a U...

ASP.NET 2.0 XmlDataSource's XPath doesn't support namespaces

Hi all. I'm trying to display (using a asp:Repeater and a asp:XmlDataSource) the content of a sitemap.xml file (see standard defined into http://www.sitemaps.org/protocol.php). The problem is that the binder <%#XPath("myNodeName")%> can't work when the source xml document contains custom namespaces (like required by the standard that d...

asp:HyperLink build NavigateUrl within Repeater using XPATH data

I am using a repeater for some products I am listing. I'm trying to build an asp:HyperLink NavigateUrl using both hardcoded text as well as XPATH data. NavigateUrl='mypage.aspx?ID=<%#XPath("THEID")%>&name=<%#XPath("THENAME")%>' Obviously this isn't working. Does anyone know how to make this work? ...

Xpath within ItemDataBound for Repeater

Okay so I'm pulling in an XML feed from feedburner, using an XMLDataSource and a repeater. <asp:Repeater ID="rptrEvents" OnItemDataBound="rptrEvents_ItemDataBound" DataSourceID="XmlDataSource1" runat="server"> <ItemTemplate> <li runat="server" id="liLineItem"> <a href="<%#XPath("link")%>"> ...

How do I serialize modified in-memory xml from an XmlDataSource without calling XmlDataSource.Save()?

// XmlDataSource Setup XmlDataSource xds = new XmlDataSource(); xds.Data = @" <attributes> <attribute>ATTR1</attribute> <attribute>ATTR2</attribute> </attributes>"; xds.XPath = @"attributes/attribute"; xds.DataBind(); The XmlDataSource is used to render and modify contents in a Telerik RadGrid. How do I access t...

ASP.Net VB - Gridview, XmlDataSource - handle missing field

Hi have a GridView associated with an XmlDataSource that's structure is dynamic. Essentially, the service that provides the XML simply leaves off an attribute when there's no value, instead of returning an empty value. This tosses an error and I the rows that come after the one with the missing attribute are not rendered. My issue is th...

ASP.Net menu databinding encoding problem

Hi, I have a menu where I bind data through: XmlDataSource xmlData = new XmlDataSource(); xmlData.DataFile = String.Format(@"{0}{1}\Navigation.xml", getXmlPath(), getLanguage()); xmlData.XPath = @"/Items/Item"; TopNavigation.DataSource = xmlData; TopNavigation.DataBind(); The problem is when my xml has...

Why oh why doesn't my asp.net treeview update?

I'm using an ASP.net treeview on a page with a custom XmlDataSource. When the user clicks on a node of the tree, a detailsview pops up and edits a bunch of things about the underlying object. All this works properly, and the underlying object gets updated in my background object-management classes. Yay! However, my treeview just isn'...

Handling XmlDataSource when remote XML source not available

When using an XmlDataSource is there good way to handle exceptions that are caused when the remote XML file is unavailable? I'm somewhat new to .NET and using C#. ...

Populating a GridView with an XmlDataSource at runtime

I'm trying to use a GridView in a User Control with an XmlDataSource and the XmlDataSource will not be populated until runtime. I have another User Control that the user will use to pass in parameters for what data to display. The main Page that both these controls reside on collects the parameters from the Selector User Control and ge...

XmlDataSource with XPath - can I get the raw data in code?

If an ASP.NET form has an XmlDataSource on it, and in code I am setting the XPath filter, e.g: xmlExample.XPath = String.Format("data/reasons/reason[@text='{0}']/details/",someValue); ... can I then get the result of that XPath filtering in code, or do I have to bind to a control to find out the results? In other words, is it p...

[Solved] Updating a XmlDataSource at runtime

Hi, I have this DropDownList bound to a XmlDataSource, but the XPath must depend on another input (another DropDownList). I modify the XPath and rebind inside the parent DDL's SelectedIndexChanged, but the page does not refresh. What should I do to display the update? protected void ProductDropDownList_SelectedIndexChanged(object sende...