473,799 Members | 3,163 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

bind menu control with an xml dataset

hi,

is there a way to bind a menu control with a dataset without get this
error?

System.InvalidO perationExcepti on: HierarchicalDat aBoundControl only
accepts data sources that implement IHierarchicalDa taSource or
IHierarchicalEn umerable.

I've tryed this , but it doesn't render correctly and write the menu
with some extra elements

Dim x As New XmlDataSource
x.DataFile = Master.serverMa pPath + "app_data/level2Menu.xml"

Menu1.DataSourc e = x
Menu1.DataBind( )

Apr 10 '06 #1
1 6909
So, I am confused. You asked
is there a way to bind a menu control with a dataset without get this
error?
Your code shows ASP.NET 2.0 databinding to an XmlDataSource, which should
work fine with a Menu control.
http://msdn2.microsoft.com/en-us/lib...5z(VS.80).aspx

Are you trying to bind to a DataSet? Is that where the error message you
included came from? Binding to a DataSet is another story, the short answer
is No. Fundamentally a DataSet, which you can do using ASP.NET 1.1
data-binding syntax, presents itself as a "tabular" data store. Menu
control wants a "hierarchic al" data store. Thats what the error message you
included here is telling you.

"cipcip" <pa******@tisca li.it> wrote in message
news:11******** **************@ g10g2000cwb.goo glegroups.com.. . hi,

is there a way to bind a menu control with a dataset without get this
error?

System.InvalidO perationExcepti on: HierarchicalDat aBoundControl only
accepts data sources that implement IHierarchicalDa taSource or
IHierarchicalEn umerable.

I've tryed this , but it doesn't render correctly and write the menu
with some extra elements

Dim x As New XmlDataSource
x.DataFile = Master.serverMa pPath + "app_data/level2Menu.xml"

Menu1.DataSourc e = x
Menu1.DataBind( )

Apr 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
2565
by: Jed | last post by:
I have a web service method that returns an array of custom objects marked serializeable with fully described public properties. When I bind the results to a DataGrid I can access the properties in the ItemDataBound event of the codebehind but I can't access them declaratively in the HTML code? Here is the code to call the method. net.mysite.www.WSInterface proxy; proxy = new net.mysite.www.WSInterface();
3
17765
by: MrMike | last post by:
Hi. I have a dataset on my webform which I successfully fill by calling a Sub that occurs after the Page_Load. My question is - I have a textbox control which I need to populate with the contents of one of the Dataset columns. If I set set the binding properties using the properties window, this isn't successfull since the textbox attempts to bind at page_load, at which time the dataset is not filled. How can I use VB code to specify...
3
2757
by: AH | last post by:
Hi all, I noticed this strange behavior; I created a new control (example inherits from textbox) and add a new property, then I bind this new property to a field in my dataTable in a dataSet. After the binding statement, when I check for dataset.getchanges ... it alway returns that there is changes (even the propety just set the value and get the same value to return)... I have tried to understand what has changed by using the...
3
3292
by: serge calderara | last post by:
Dear all, Does anyone know how to bind a System.Collection.ArraysList object to a Dataset ? Thanks for your reply Regards Serge
0
1391
by: cipcip | last post by:
hi is there a way to bind a menu control with a dataset without get this error? System.InvalidOperationException: HierarchicalDataBoundControl only accepts data sources that implement IHierarchicalDataSource or IHierarchicalEnumerable. I've tryed this , but it doesn't render correctly and write the menu with some extra elements
0
1267
by: JP2006 | last post by:
I'm having an issue with a control I'm writing to consume RSS feeds. It gets a feed via a querystring parameter and sticks it in a dataset. I then use the dataset to write out the feed title and description then specifiy a specific table within the dataset (the one with the actual items) to bind to a repeater control. The problem is that not all feeds seems to start the item table at the same level; I specifiy a table within the dataset to...
0
1661
by: John Smith | last post by:
If anyone can help, I would very muchly appreciate it. I have a main page that uses the .net 2.0 menu control with the multiview controls as the menu choices. This works fine. One of the menu choices dynamically loads a user control with a gridview (datagrid) control on it. That works fine. The problem arises when the user clicks on a different page of the gridview control---this is a paged gridview. When that happens, the gridview...
2
1631
by: MMA | last post by:
How do I populate the menu control in 2.0 from a database. I know this can be done with the Tree Control. Any code snippets? Thanks in advance.
1
2380
by: Brad Isaacs | last post by:
want to know if you could please help me out in resolving an issue I am having regarding my Menu control. The ASP.NET Menu control requires extra work in order to access the database data, if you want to populate your Menu control with database data. I have added my control to my MasterPage and written some code to display the data from the dataset table. However, I cannot figure out how I am going to extract the LANGUAGE used by the...
0
9686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10250
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10222
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10026
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9068
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7564
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3757
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.