473,396 Members | 1,996 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

c# menu programming problem

Hello, I am fairly new to programming. I am trying to get a menu
system to display a blank page for me. The menu manufacturer says I
need to implement the following code and that it may require some
changes for it to work....well I can't get it to work and am looking
for some help as I desparately need to get this working.

It bombs on the first line as the BaseMenu1.DataItem is of type
System.Data.DataRowView all the menu developer will tell me is that I
need to change the IDataRecord to something else...I am getting a
'specified cast is not valid'...

BaseMenu1's datasource is a dataset and I am told by the menu
developer that I have to use the .DataItem method to get at the data I
need to do the comparison against...

The code below runs when I bind the menu to the datasource (dataset).

public void BaseMenu1_ItemDataBound( object sender,
NavigationItemEventArgs e) { IDataRecord record =
(IDataRecord)BaseMenu1.DataItem; if
((bool)record["new_target_window"])
e.NavigationItem.TargetWindow = "_blank"; }
I have set up a new event handler as follows.
this.BaseMenu1.ItemDataBound += new
EO.Web.NavigationItemEventHandler(this.BaseMenu1_I temDataBound);

I am using .Net 1.1 and ASP.net. Any help would be greatly
appreciated.

Mar 5 '07 #1
0 821

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

Similar topics

22
by: Marek Mand | last post by:
How to create a functional *flexible* UL-menu list <div> <ul> <li><a href=""></li> <li><a href=""></li> <li><a href=""></li> </ul> </div> (working in IE, Mozilla1.6, Opera7 (or maybe even...
3
by: Mark Constant | last post by:
I am taking a Javascript course online. We are learning to create drop-down menus with <div> layers. The problem is that the way the books teachers us to get the dropdown menu to work you have to...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
2
by: mjeassoc | last post by:
I have a fairly simple page serving as a portfolio. It is a long page, with narrative and large thumbs which link to other pages, larger photos, pdf files, etc. Near the top of the page, I have...
5
by: Andy | last post by:
Hi I am writing a small calculator program using switch() for a menu. The menu is presented at first, selection read in via scanf(), and calculation is executed. At the end of the operation, the...
5
by: Dean L. Howen | last post by:
Dear friends, Could we determine when context menu should appear?
0
by: Victor Yen | last post by:
Hi, I am a beganer of programming. Now I am using eMbedded Visual C++3.0 to write a program on my PDA. I want to use menu in my dialog box. I think I had successfully added the menu, however, when...
2
by: Dean Slindee | last post by:
Is there a maximum number of menu items that can be added to a single form? If there is no maximum, that would help eliminate one possible source of the problem. I had six main menu items in the...
9
by: Anic297 | last post by:
Hello, I'm a newbie in php. I would like to show a popup menu on my website and update the page when the user has changed its selection. I have looked over the Internet but haven't found what I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...

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.