<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Client Side Web Development</title><link>http://forums.asp.net/130.aspx</link><description>Client-side programming discussions, including CSS, DHTML, JScript/Javascript, etc. &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=18&amp;c=16" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/3267098.aspx</link><pubDate>Tue, 30 Jun 2009 17:04:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3267098</guid><dc:creator>tsivinsky</dc:creator><author>tsivinsky</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/3267098.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=3267098</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;amcevoy:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;This worked for us. Not sure if it will work for you, have a look and see what you think:&lt;/p&gt;
&lt;p&gt;Issue: Unable to trigger a trappable event with arguments from behind an ASP.Net 2.0 Menu control. Works fine on the top level menu items, but not on sub-items.&lt;/p&gt;
&lt;p&gt;Basically, we have a list of commands arranged in a menu structure. Each time a command is sent, a javascript confirm box needs to be displayed that subsequently either processes a click event on a button or not. I think that the begining and end scenarios tie up with what your looking for. It&amp;#39;s VB.Net, but should be extensible to a language of your choice.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;Step one:&lt;/span&gt; Menu items&lt;/p&gt;
&lt;p&gt;To each item we added the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dim oMenuItem as New MenuItem&lt;/p&gt;
&lt;p&gt;oMenuItem.Text = &amp;quot;Whatever&amp;quot;&lt;/p&gt;
&lt;p&gt;oMenuItem.NavigateUrl = &amp;quot;javascript:validate(&amp;#39;&amp;quot; &amp;amp; OutGoingCommand &amp;amp; &amp;quot;&amp;#39;);&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;Step two&lt;/span&gt;: JavaScript Function on Page:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;function validate(zMessage)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;// show confirm dialogue&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;if (confirm(&amp;#39;Are you sure...?&amp;#39;))&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;document.getElementById(&amp;#39;cmdCommandButton&amp;#39;).click();&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;amcevoy:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;This worked for us. Not sure if it will work for you, have a look and see what you think:&lt;/p&gt;
&lt;p&gt;Issue: Unable to trigger a trappable event with arguments from behind an ASP.Net 2.0 Menu control. Works fine on the top level menu items, but not on sub-items.&lt;/p&gt;
&lt;p&gt;Basically, we have a list of commands arranged in a menu structure. Each time a command is sent, a javascript confirm box needs to be displayed that subsequently either processes a click event on a button or not. I think that the begining and end scenarios tie up with what your looking for. It&amp;#39;s VB.Net, but should be extensible to a language of your choice.&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;Step one:&lt;/span&gt; Menu items&lt;/p&gt;
&lt;p&gt;To each item we added the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dim oMenuItem as New MenuItem&lt;/p&gt;
&lt;p&gt;oMenuItem.Text = &amp;quot;Whatever&amp;quot;&lt;/p&gt;
&lt;p&gt;oMenuItem.NavigateUrl = &amp;quot;javascript:validate(&amp;#39;&amp;quot; &amp;amp; OutGoingCommand &amp;amp; &amp;quot;&amp;#39;);&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;Step two&lt;/span&gt;: JavaScript Function on Page:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;function validate(zMessage)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;// show confirm dialogue&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;if (confirm(&amp;#39;Are you sure...?&amp;#39;))&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;document.getElementById(&amp;#39;cmdCommandButton&amp;#39;).click();&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;span style="font-weight:bold;" class="Apple-style-span"&gt;Step 3:&lt;/span&gt; Code behind&lt;/p&gt;
&lt;p&gt;Write whatever code you need in the _Click event of cmdCommandButton.&lt;/p&gt;
&lt;p&gt;Worked for us...&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;DS-9 Development Team.&lt;/p&gt;&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Extremely useful and accurate post.&amp;nbsp;&lt;/p&gt;&lt;p&gt;Another good thing about this approach: if you don&amp;#39;t need to use code behind, no postback has been generated.&lt;/p&gt;&lt;p&gt;Thus, you are able to use pure client-side processing for Menu control.&lt;/p&gt;&lt;p&gt;It is not necessary to add menu items dynamically. You can create Menu using VS aspx form.&lt;/p&gt;&lt;p&gt;You can add NavigationURL on Page_Load or statically. It works for sub_items, too...&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2257369.aspx</link><pubDate>Wed, 26 Mar 2008 19:23:04 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2257369</guid><dc:creator>amcevoy</dc:creator><author>amcevoy</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2257369.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2257369</wfw:commentRss><description>&lt;p&gt;This worked for us. Not sure if it will work for you, have a look and see what you think:&lt;/p&gt;
&lt;p&gt;Issue: Unable to trigger a trappable event with arguments from behind an ASP.Net 2.0 Menu control. Works fine on the top level menu items, but not on sub-items.&lt;/p&gt;
&lt;p&gt;Basically, we have a list of commands arranged in a menu structure. Each time a command is sent, a javascript confirm box needs to be displayed that subsequently either processes a click event on a button or not. I think that the begining and end scenarios tie up with what your looking for. It&amp;#39;s VB.Net, but should be extensible to a language of your choice.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Step one:&lt;/strong&gt; Menu items&lt;/p&gt;
&lt;p&gt;To each item we added the following:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Dim oMenuItem as New MenuItem&lt;/p&gt;
&lt;p&gt;oMenuItem.Text = &amp;quot;Whatever&amp;quot;&lt;/p&gt;
&lt;p&gt;oMenuItem.NavigateUrl = &amp;quot;javascript:validate(&amp;#39;&amp;quot; &amp;amp; OutGoingCommand &amp;amp; &amp;quot;&amp;#39;);&amp;quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step two&lt;/strong&gt;: JavaScript Function on Page:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;function validate(zMessage)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;// show confirm dialogue&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;if (confirm(&amp;#39;Are you sure...?&amp;#39;))&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;{&lt;/p&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;document.getElementById(&amp;#39;cmdCommandButton&amp;#39;).click();&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Code behind&lt;/p&gt;
&lt;p&gt;Write whatever code you need in the _Click event of cmdCommandButton.&lt;/p&gt;
&lt;p&gt;Worked for us...&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;DS-9 Development Team.&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2245483.aspx</link><pubDate>Thu, 20 Mar 2008 15:50:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2245483</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2245483.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2245483</wfw:commentRss><description>&lt;p&gt;And maybe if you would actually read the links posted you would not need to get angry.&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2245415.aspx</link><pubDate>Thu, 20 Mar 2008 15:27:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2245415</guid><dc:creator>alan93</dc:creator><author>alan93</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2245415.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2245415</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;NC01:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;alan93:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;Even so, your last post was totally irrelevant to my OP which was: &lt;/p&gt;
&lt;p&gt;&amp;quot;I have this where the button calls a java script function. I want the menu item to do the same&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;This is the second time that it sounds like you are getting angry with me for attempting to help you. Sorry if you can&amp;#39;t do something that you want to do and I can&amp;#39;t help you on it.&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Maybe if&amp;nbsp;your responses were&amp;nbsp;more succinctly on&amp;nbsp;topic and you&amp;nbsp;didn&amp;#39;t suggest&amp;nbsp;&amp;quot;people need to read more&amp;quot;&amp;nbsp;, you would find yourself accusing people of being &amp;quot;angy&amp;quot; less often and would spend less time being defensive.&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2243176.aspx</link><pubDate>Wed, 19 Mar 2008 17:21:44 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2243176</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2243176.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2243176</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;alan93:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;Even so, your last post was totally irrelevant to my OP which was: &lt;/p&gt;
&lt;p&gt;&amp;quot;I have this where the button calls a java script function. I want the menu item to do the same&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;This is the second time that it sounds like you are getting angry with me for attempting to help you. Sorry if you can&amp;#39;t do something that you want to do and I can&amp;#39;t help you on it.&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;alan93:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;So I am not trying to execute a menu item event, but call a javascript from the menu item the same way I do from the button. I had no idea ASP.NET was so limited in this regards and lacked this kind of flexibility.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;I guess that you can&amp;#39;t do that, since a MenuItem does not seem to have anything to attach client-side event handlers to.&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;alan93:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;Developers should not have to spend so many days trying to figure out that something is nearly impossible that used to be so commonplace in the previous framework.&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;What previous Framework are you referring to? To my knowledge, this is the first that has a menu control built in. I know that version 1.1 did not. The beauty of ASP.NET is that you can build your own controls exactly to your specifications, so maybe you should construct your own since this one seems to fall short. Here is a one that might get you started: &lt;a href="http://www.codeproject.com/KB/custom-controls/webmenu.aspx"&gt;http://www.codeproject.com/KB/custom-controls/webmenu.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2243099.aspx</link><pubDate>Wed, 19 Mar 2008 16:48:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2243099</guid><dc:creator>alan93</dc:creator><author>alan93</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2243099.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2243099</wfw:commentRss><description>&lt;p&gt;Actually I have read quite a bit here&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="http://quickstarts.asp.net/QuickStartv20/util/classbrowser.aspx?assembly=System.Web,%20Version=2.0.0.0,%20Culture=neutral,%20PublicKeyToken=b03f5f7f11d50a3a&amp;amp;namespace=System.Web.UI.WebControls&amp;amp;class=Button"&gt;http://quickstarts.asp.net/QuickStartv20/util/classbrowser.aspx?assembly=System.Web,%20Version=2.0.0.0,%20Culture=neutral,%20PublicKeyToken=b03f5f7f11d50a3a&amp;amp;namespace=System.Web.UI.WebControls&amp;amp;class=Button&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;and here:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://quickstarts.asp.net/QuickStartv20/util/classbrowser.aspx?assembly=System.Web,%20Version=2.0.0.0,%20Culture=neutral,%20PublicKeyToken=b03f5f7f11d50a3a&amp;amp;namespace=System.Web.UI.WebControls&amp;amp;class=Menu"&gt;http://quickstarts.asp.net/QuickStartv20/util/classbrowser.aspx?assembly=System.Web,%20Version=2.0.0.0,%20Culture=neutral,%20PublicKeyToken=b03f5f7f11d50a3a&amp;amp;namespace=System.Web.UI.WebControls&amp;amp;class=Menu&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Even so, your last post was totally irrelevant to my OP which was:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;quot;I have this where the button calls a java script function. I want the menu item to do the same&amp;quot;&lt;/p&gt;
&lt;p&gt;So I am not trying to execute a menu item event, but call a javascript from the menu item the same way I do from the button. I had no idea ASP.NET was so limited in this regards and lacked this kind of flexibility.&lt;/p&gt;
&lt;p&gt;Developers should not&amp;nbsp;have to spend so many days trying to figure out that something is nearly impossible that used to be so commonplace in the previous framework.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2242920.aspx</link><pubDate>Wed, 19 Mar 2008 15:38:28 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2242920</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2242920.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2242920</wfw:commentRss><description>&lt;p&gt;I just tried this which I copied from &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menu.menuitemclick(VS.80).aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menu.menuitemclick(VS.80).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;asp:menu id=&amp;quot;Menu1&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; staticdisplaylevels=&amp;quot;2&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; staticsubmenuindent=&amp;quot;10&amp;quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; orientation=&amp;quot;Vertical&amp;quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; onmenuitemclick=&amp;quot;OnMenuItemClick&amp;quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt;protected void OnMenuItemClick(object sender, MenuEventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;this.Response.Write(&amp;quot;Selected &amp;quot; + e.Item.Text + &amp;quot;&amp;lt;br&amp;gt;&amp;quot;);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;It does not look that much different from what you posted. Maybe you need to read up on the control and try the examples.&lt;br /&gt;See &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menu(VS.80).aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menu(VS.80).aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2242884.aspx</link><pubDate>Wed, 19 Mar 2008 15:22:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2242884</guid><dc:creator>alan93</dc:creator><author>alan93</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2242884.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2242884</wfw:commentRss><description>&lt;p&gt;I&amp;#39;m trying to figure out why this doesn&amp;#39;t work.&lt;/p&gt;
&lt;p&gt;button calls javascript menu item doesn&amp;#39;t.&lt;/p&gt;&lt;font color="#0000ff" size="1"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="1"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="1"&gt;Button&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;Button1&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;Style&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;left: 437px; position: absolute; top: 258px&amp;quot;&lt;/p&gt;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;Text&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;Button&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;Width&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;69px&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;OnClick&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;Button1_Click&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;/&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="1"&gt;parallel menu item code:&lt;/font&gt;&lt;/p&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#0000ff" size="1"&gt;
&lt;p&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="1"&gt;asp&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;:&lt;/font&gt;&lt;font color="#a31515" size="1"&gt;Menu&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;ID&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;Menu1&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;runat&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;server&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="1"&gt;onmenuitemclick&lt;/font&gt;&lt;font color="#0000ff" size="1"&gt;=&amp;quot;OnMenuItemClick&amp;quot;&lt;/font&gt;&lt;font color="#ffffff" size="1"&gt; &lt;/font&gt;&lt;font size="1"&gt;&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#ffffff" size="1"&gt;&lt;font color="#0000ff"&gt;with this:&lt;/font&gt;&lt;/font&gt;&lt;/font&gt; 
&lt;p&gt;&lt;font color="#0000ff" size="1"&gt;&lt;font color="#ffffff" size="1"&gt;&lt;font color="#0000ff"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Button1.Attributes.Add(&amp;quot;OnClick&amp;quot;, &amp;quot;return getFile();&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Menu1.Attributes.Add(&amp;quot;onmenuitemclick&amp;quot;, &amp;quot;return getFile();&amp;quot;);&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void OnMenuItemClick(object sender, MenuEventArgs e)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2238241.aspx</link><pubDate>Mon, 17 Mar 2008 19:40:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2238241</guid><dc:creator>alan93</dc:creator><author>alan93</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2238241.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2238241</wfw:commentRss><description>&lt;p&gt;looks like menu events and button events are meant to be forever separate.&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2238201.aspx</link><pubDate>Mon, 17 Mar 2008 19:19:02 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2238201</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2238201.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2238201</wfw:commentRss><description>&lt;p&gt;Well look here &lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitem.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menuitem.aspx&lt;/a&gt;&amp;nbsp;Maybe you can find a property that will work for you.&lt;/p&gt;
&lt;p&gt;NC...&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2238170.aspx</link><pubDate>Mon, 17 Mar 2008 19:07:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2238170</guid><dc:creator>alan93</dc:creator><author>alan93</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2238170.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2238170</wfw:commentRss><description>&lt;p&gt;Item does not have an Attributes prop.&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2238160.aspx</link><pubDate>Mon, 17 Mar 2008 19:03:46 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2238160</guid><dc:creator>alan93</dc:creator><author>alan93</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2238160.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2238160</wfw:commentRss><description>&lt;p&gt;I&amp;#39;ll try that&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2238138.aspx</link><pubDate>Mon, 17 Mar 2008 18:54:55 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2238138</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2238138.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2238138</wfw:commentRss><description>&lt;p&gt;Sure (not tested but this should work)&lt;/p&gt;
&lt;p&gt;protected void yourMenu_MenuItemDataBound(object sender, MenuEventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;// Add a client-side onclick event handler to the &amp;quot;Home&amp;quot; menu item...&lt;br /&gt;&amp;nbsp;if ( e.Item.Text == &amp;quot;Home&amp;quot; )&lt;br /&gt;&amp;nbsp;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; e.Item.Attributes.Add(&amp;quot;onclick&amp;quot;, &amp;quot;return getFile();&amp;quot;);&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2237990.aspx</link><pubDate>Mon, 17 Mar 2008 17:41:18 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2237990</guid><dc:creator>alan93</dc:creator><author>alan93</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2237990.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2237990</wfw:commentRss><description>&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;NC01:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt; 
&lt;p&gt;Handle the MenuItemDataBound event of the Menu and attach it in there. This link has a nice example&amp;nbsp;showing adding an image URL to a menu item:&amp;nbsp;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menueventargs.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menueventargs.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;MenuItemDataBound- &amp;quot;Occurs when a menu item is bound to data. This event is commonly used to modify a menu item before it is rendered in a &lt;a id="ctl00_rs1_mainContentContainer_ctl32" href="http://msdn2.microsoft.com/en-us/library/07b8w058.aspx"&gt;Menu&lt;/a&gt; control.&amp;quot;&lt;/p&gt;
&lt;p&gt;Thanks for the response but I am missing something here.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp; I don&amp;#39;t see wht this as to do with calling a button event from a menu item &lt;/p&gt;
&lt;p&gt;2. I don&amp;#39;t see how putting an image on a menu item has anything to do with calling a button function from a menu item.&lt;/p&gt;
&lt;p&gt;Maybe if you could explain &amp;quot;it&amp;quot; and &amp;quot;there&amp;quot; more&amp;nbsp;for me?&lt;/p&gt;</description></item><item><title>Re: Calling a button click event from a menu item click</title><link>http://forums.asp.net/thread/2237903.aspx</link><pubDate>Mon, 17 Mar 2008 17:05:59 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2237903</guid><dc:creator>NC01</dc:creator><author>NC01</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2237903.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=130&amp;PostID=2237903</wfw:commentRss><description>&lt;p&gt;Handle the MenuItemDataBound event of the Menu and attach it in there. This link has a nice example&amp;nbsp;showing adding an image URL to a menu item:&amp;nbsp;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menueventargs.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.menueventargs.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;NC...&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>