473,325 Members | 2,480 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,325 software developers and data experts.

asp:Menu - Adding an OnClientClick Event

I am trying to add an OnClientClick event to links in an asp:Menu.

I tried using a StaticItemTemplate to bind the MenuItem data to a LinkButton
with an OnClientClick attribute. This works fine to a point. This does get an
OnClientClick event onto the menu items but it causes the codebehind
ItemCommand for the Menu to become unwired. It seems that when my Menu is
rendered to html the link buttons in the menu have two <atags rendered one
inside another. The outer <atag has the OnClientClick event but the call to
__DoPostBack is missing its EventArgument. The inner <atag has the
EventArgument.

Any one know of another way to add an OnClientClick attribute to a menuItem
in an asp:Menu control?

-J
Aug 3 '06 #1
0 3794

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

Similar topics

7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
7
by: tfsmag | last post by:
Has anyone had a problem with putting a menu control into a master page in .net 2.0? I have a problem where if i just drop a menu control on a regular page the menu works fine, the submenus work...
2
by: jason | last post by:
Does anybody know how I would get borders around each menuitem? Do I have incorportate into a table? Thanks. The below produces a border around the entire menu. <form id="form1" runat="server">...
2
by: Kevin L. Kitchens | last post by:
Howdy... Been toying the the asp:menu object in order to dump the manually generated menu I've been using, however, I cannot seem to get the coloring to work properly. First off, what CSS...
0
by: =?Utf-8?B?SmltSGVhdmV5?= | last post by:
I am have a ASP:Menu with static and dynamic menu items. Each of the static items has dynamic menu items. If the user clicks on a static menu item, which has no click event, then menu item...
1
by: eps | last post by:
Has anyone have any experience of doing this ? I want a small menu on each row with a few options, I have tried it and it seems to work great at first but after clicking on a menu item and...
3
by: kenny bones | last post by:
Hi! I'm currently working on a menu which is based on CSS and is listed with <li> tags. The CSS code looks like this: #nav { position: absolute; top: 101px; left: 390px; list-style: none;...
2
by: alexandis | last post by:
I have menu bound to sitemap file. This is a piece of code <asp:menu ... > <StaticItemTemplate> <%# ((MenuItem)Container.DataItem).Selected ? : %> </StaticItemTemplate> </asp:menu> I check...
0
by: BooGhost | last post by:
Some background: 1. I've got a master page with an asp:Menu using an XML sitemap. 2. A page that uses the master page has an object tag (instancing an activex control) 3. This activex control...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.