.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

how to disable menu mouseover event in asp.net

Posted By:      Posted Date: October 03, 2010    Points: 0   Category :.NET Framework

hi ,i want to diasble menu mouseover event .and the submenu should only be shown on clicking the parent menu.

for that i have written code as 

 protected override void Render(HtmlTextWriter writer) {


      StringBuilder stringBuilder = new StringBuilder();

       StringWriter stringWriter = new StringWriter(stringBuilder);


       HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);



       string html = stringBuilder.ToString();

       //html = html.Replace("onmouseover="(Menu_HoverStatic(this))"","onclick="(Menu_HoverStatic(this)""));

       html = html.Replace("onmouseover=\"Menu_HoverStatic(this)\"", "onclick=\"Menu_HoverStatic(this)\""); 





give me a correct code .

View Complete Post

More Related Resource Links

how to disable mouseover event of menu

hi i have a menu which i have bind with database dynamically on page load .i want that when i click on parent item of menu then only the subitem should display,mean i dont want the submenu visible on mouseover.it should be disable.should be enable only on click .i have try many logic for it but i was not sucesful please give me the proper code  

Disable Login event firing in SP 2007

hello, how can i disable the login event firing in sharepoint ?...i just want to disable the sign in event 

Disable Master Page Menu

Dear all, How can I disable the master page menu? The following line does not work. this.Master.findcontrol("menu1").visible=false;  Moreover, if this line is put before the function database processing (Code Behind) in the button click, would the menu bar become invisible during function database processing? I think it is different from web application and intranet application.

disable browser keys & menu functions

I ran across a few links on making an asp.net app fullscreen with javascript.    But I'd also like to keep users withing my app unless they log out.    How do you disable ctrl-esc, ctrl-c, window, selection & right mouse click?    Are there any other keys you can use to prevent a user from either copying data from a browser window or closing it?     That would also mean eliminating or suppressing the upper right hand minimize & close buttons in browser windows and the file menu.     If the code is specific to internet explorer then I'd also have to check whether their browsing from a firefox browser, unless the code would be the same for both.    

Is it possible to disable context menu items based on the selection on Treeview

I will have some sort of nodes for a treeview as follows Root |-> some.txt(A text file which was added at runtime) |->Child(child for some.txt) |-> child1(child for child) I designed my context menu with some options as New and Remove What i need is when i righclick on Root, child or child i would like to disable the Remove option

disable a single intem in dropdownlist or stop the ddl change event for a single item


hello guys,

I am trying something apart of my boundries, is there any way to disable a single intem in dropdownlist or stop the ddl change event for a single item.

any feadback would be appriciable.

Thanks and Regards

Inderjeet Singh Khalsa

Disable Ribbon menu


Hi, i want to disable the ribbon menú in my application. Its posible? or i need to delete it in the master page?



How to change image with mouseover event


Hello all,

I am trying to make a dynamic image loader the simplest and easiest way possible. I'd like to have 3 to 4 html links that have a .net onmouseover and onmouseout event that loads an image in a seperate part of the page.

So far I am struggling with even getting this started. Any advise?

Here is what I have so far:

<a href="MyPage.aspx" onmouseover="LoadOverviewImage" runat="server">MyPage</a>

My thinking on this is that the "loadOverviewImage" will run a c# function that will control the image modification on the mouse over and off.


Disable all day event in Calendar list

Hi there,

Is there anyway of disabling the All day Event field in a Calendar list. I don't have the option to hide it either.

How to disable "All day event" of Calendar list in email alerts ?




I have hidded the All day event in display, edit, new forms using javascript code.

I want to hide the "All Day Event","Recurrence",Workspace of calendar list in email alerts



Srikanth Reddy


disable button in page load click event using javascript



i have button its  enable false in aspx page, if i click the page load  click event  then button should enable

looking forward the reply.

How to disable context menu command



Tim's blog post discusses commands in the rehosted designer.  This post has been very helpful.  Now what I'm trying to do is to customize the context menu that appears for activity designers.  I used the idea from the blog post to capture the designer's cut command PreviewCanExecute:

                <CommandBinding Command="sapv:DesignerView.CutCommand"  CanExecute="CommandBinding_CanCutExecute" PreviewCanExecute="CommandBinding_PreviewCanCutExecute"/>


private void CommandBinding_CanCutExecute(object sender, CanExecuteRoutedEventArgs e)
            //Doesn't do anything, but we need to subscribe to the CanExcute handler in order to get PreviewCanExecute handler called.

        private void CommandBinding_PreviewCanCutExecute(object sender, CanExecuteRoutedEventArgs e)

How to disable the controls within the JQGrid on some other event



I am trying to disable the controls within the JQGrid on some other event. Please let me know how can i do this. Below is my JQGrid Basically i want to disable the custom buttons btnDeleteExistingRoles, btnAddExistingRoles and the checkboxes that are created in the "Select" column( i have written a custom formatter for this). Please help

jQuery(document).ready(function() {

    $('#btnHdnExistingRoles').click(function() {
        var lastsel2;
        jQuery("#grdExistingRoles").jqGrid({ url: '/SAPWebAccess/Role.mvc/GetExistingRoleForUser/',
            datatype: 'json', mtype: 'GET',
            colNames: ['Role ID', "<input type='checkbox' id = 'headerCheck' onclick='checkAll(\"grdExistingRole\");'>", 'Role Name', 'Role Text', 'Valid From'

Enable/Disable "New Folder" ribbon menu in document library in sharepoint 2010


I am new to sharepoint 2010. I want to disable "New Folder" server ribbon menu under document library only if I am at level greater than 2 in document library. If level is <=2 "New Folder" ribbon menu should be enabled. How I should achive this enable/disable feature of existing "New Folder" menu item?    

Static menu item click event not firing


Hello, I have a basic static menu using images for ui. I don't have the nav url set nor the value property set on any items. In  this configuration the Item Click event is not firing. If I set the value propery to any value the event fires however the value is displayed in the UI. This is not the desired effect as I do not anything other than the images to show in the ui. The code follows:


<asp:Menu runat="server" ID="MainMenuCtl" BorderWidth="0" Orientation="Vertical">
                                    <asp:MenuItem ImageUrl="~\App_Themes/SiteDefault/Images/Mediabutton.png" ToolTip="Media Clips" ></asp:MenuItem>
                                    <asp:MenuItem ImageUrl="~\App_Themes/SiteDefault/Images/CalendarButton.png" ToolTip="View calendar of events"></asp:MenuItem>
                                    <asp:MenuItem ImageUrl="~\App_Themes/SiteDefault/Images/PoetryButtonReg.png" ToolTip="Poetry"></asp:MenuItem>

ASP.NET Menu with jQuery Superfish

Choosing the right type of menu for a website is not easy at all. The ASP.NET Menu Control is definitely NOT a good starting point due to the horrendous markup it renders, nor is it good for SEO because of the Markup/Content ratio, neither can it be easily styled.

Radio Button Event

Here I have explained the events of radio button with javascript.
Let me explain the scenarion first,
We are having two radio button say radioobtn1 and radiobtn2. If I click on the button 1 then I need to show one DIVor FORM. same as when I click on radiobtn 2. I have given the code for the above scenarion.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend