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

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

In CssFriendly adapter Scrollbar is needed in Vertical Menu

Posted By:      Posted Date: September 15, 2010    Points: 0   Category :ASP.Net
Hi all,I have used cssfriendly adapter for creating vertical menu.... as i have more number of submenus and more number of listitems.... i need scrollbar.. in menu as it goes down the browser window..or menu should move up as it hit browser window....I tried "IFRAME" scrollable yes...and many different approach but could not get it....plz anybody can help it out.........

View Complete Post

More Related Resource Links

In CssFriendly adapter Scrollbar is needed in Vertical Menu


Hi all,

I have used cssfriendly adapter for creating vertical menu.... as i have more number of submenus and more number of listitems.... i need scrollbar.. in menu as it goes down the browser window..

or menu should move up as it hit browser window....

I tried "IFRAME" scrollable yes...and many different approach but could not get it....

plz anybody can help it out.........

Modify Menu adapter to show selected


Hey, I need some help modifying the menu adapter code to give child <ul> elements a class value indicating that the parent is selected. It should render like this:


< ul class="AspNet-Menu">
	< li class="AspNet-Menu-WithChildren  AspNet-Menu-ChildSelected">
		< a href="/rockit/admin/Default.aspx" class="AspNet-Menu-Link  AspNet-Menu-ChildSelected">
		< span>Mypage< /span>< /a>
			< ul class="AspNet-Sub AspNet-Sub-Selected">
				< li class="AspNet-Menu-Leaf  AspNet-Menu-Selected">
					< a href="/rockit/admin/Default2.aspx" class="AspNet-Menu-Link  AspNet-Menu-Selected">
					< span>Test< /span>< /a>
				< /li>
				< li class="AspNet-Menu-Leaf">
					< a href="/rockit/Default3.aspx" class="AspN

horizontal navigation menu instead of vertical

Hello I'm a newbie and using the internet/publication site type. Is there a simple way to have the Navigation (menu) oriented in a horizontal with dropdown menus instead of vertical? It would also be nice if the horizontal navigation wouldn't not scroll with the rest of the page. Thanks! Matt==GP Blog== http://dynamicssmallbusiness.blogspot.com/ ==Free GP Addons/Customizations/Tips== http://landiscomputer.com/offer/1010_GP_Newsletter.htm ==GP Tweets== http://twitter.com/search?q=%23dyngp#search?q=%23dyngp

how to do in vertical menu

I have created vertical menu but i need to show the color diiference for the individual menu selected. The code below:<style> #sidemenu { width: 120px; float: left; } #sidemenu ul { font: bold 12px Arial; list-style-type:none; margin: 0px; padding: 5px; color: #ebf2f7; background-color: #fff; } #sidemenu li { display: inline; /* for IE5 and IE6 */ margin: 0px 0px 2px 0px; } #sidemenu a { color: #ebf2f7; text-decoration: none; font: bold 12px Arial; display: block; padding: 5px; width: 120px; background-color: #3c7faf; border: 1px solid #3c7faf; margin: 0px 0px 3px 0px; } #sidemenu a:link, #sidemenu a:visited { color: #ebf2f7; text-decoration: none; } #sidemenu a:hover { background-color: #ebf2f7; color: #3c7faf; border: 1px solid #3c7faf; } #sidemenu li a#current { border: 1px solid red; background: red; color: #FDFCF3; } </style> <div id="sidemenu"> <ul> <li id="li1" runat="server"> <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click">1</asp:LinkButton> </li>

Vertical Align Menu Items when RenderingMode=List


I am having problems getting my Menu Items to align vertically in the middle when I set my rendering mode = list.

aspx code

        <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" 
            RenderingMode="list" CssClass="AspNet-Menu">
                <asp:MenuItem NavigateUrl="#" Text="Menu 1" Value="Menu 1"></asp:MenuItem>
                <asp:MenuItem NavigateUrl="#" Text="Menu 2" Value="Menu 2"></asp:MenuItem>
                <asp:MenuItem NavigateUrl="#" Text="Menu 3" Value="Menu 3"></asp:MenuItem>

css code for list

/* MENU */

.AspNet-Menu ul li{ width:60px; height:30px; background-color:Silver; vertical-align:middle;}
.AspNet-Menu ul li a
	color: Red;

But if i set the rendering mode to table it works fine...

aspx code

        <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" 
            RenderingMode="table" CssClass="AspNet-Menu">

SSRS 2008 / Vertical Scrollbar in e-mail delivery.



in SSRS 2008, a report delivered by e-mail displays a vertical scrollbar. (No scrollbar in native html/web rendering)

The same report deployed to 2008 "R2" does not display the bar in the e-mail.

Finicky report developers in a slight funk.

Possible patch for the 2008 behaviour?



CSS Menu Adapter is showing my Menu in the correct way?



I have added this Hortizontal Submenu with Horizontal Menu using CSS Friendly Menu Control Adapter in C# in my ASP.Net 3.5(C#) website. But its not working correctly because it is displaying Home as the only Menu item and all the other sitenodes as its subMenu. It worked perfectly fine without adapter but after adding adapter menu is just left with single menu item and all other items become its submenu items.

My siteMap structure is as follows-

  <siteMapNode title="Home" description="Home" url="~/default.aspx">
    <siteMapNode title="Products" description="Our products"
      url="~/Products.aspx" />      
    <siteMapNode title="Services" description="Services we offer"
        url="~/Services.aspx" />
        <siteMapNode title="Training" description="Training classes"
          url="~/Training.aspx" />
        <siteMapNode title="Consulting" description="Consulting services" 
          url="~/Consulting.aspx" />
        <siteMapNode title="Support" description="Supports plans" 
          url="~/Support.aspx" />

CSSFriendly Menu Not working on publishing to Server 2003+iis6


Apology for repeated posting. This was posted by error on Configuration and deployment forum:
After months of work I thought I had finished with my web application using VS2008 with CSSFriendly menu. On publishing, the menu did not work and I got all sorts of errors. Deleting  CSSFriendlyAdapters.browser in App_Browsers folder improved the layout but the menu was not rendered with css even though the html source shows thet are linked. On desperation, I changed the target Framework from 3.5 to 2.0 and then back to 3.5 with no avail. I really appreciate any help on this - I canot afford to lose another day on this problem.

Need a CSS Friendly Menu Adapter in with I can assign each first-level menu item a different CSS?



According to my project requirments I have to create an ASP.Net menu with each menu item having a different background image.

For this I need a CSS Friendly Adapter, I have searched alot and found this one Horizontal Menu Adapter .

Now I have a question regarding the web.sitemap defined in an example that comes with this above adapter code-

<?xml version="1.0" encoding="utf-8" ?>
<siteMap >
  <siteMapNode url="Nothing.aspx" title="Nothing"  description="Nothing">
    <siteMapNode url="Home.aspx" title="Home"  description="Home"></siteMapNode>
  <siteMapNode url="Forum.aspx" title="Forum"  description="Forum" >
    <siteMapNode url="MyPost.aspx" title="My Posts" description="My Post"/>
    <siteMapNode url="AllPost.aspx" title="All Posts" description="All Posts"/>
    <siteMapNode url="NewPost.aspx" title="New Posts" description="New Posts"/>

Adapter Design Pattern in C#, VB.NET

Convert the interface of a class into another interface clients expect. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces.

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.

Response.BinaryWrite help needed


Hi all

Im new to .NET and stuck now, so i hope anyone can help my with my problem.

I have a MS SQL database where i have stored some documents as Binary data. I cant figure out how to retrieve them and show/download them in my browser.

I found some guides online and have try to put something together.


private void Write()
 int id = 0;
 string strID = Request.QueryString["id"];
 int.TryParse(strID, out id);

 var db = new ModelDataContext();
 var doc = db.DocumentDatas.Where(x => x.ID == id).FirstOrDefault();

 byte[] byteArray = File.ReadAllBytes(doc);


How do i fill the byteArray with the data?

Thanks in advance :)


Problem making Role based Menu in MVC application



 I want to make Rolebase menu in MVC such that if user doesnot have permission for some action then that Action name shouldnot be shown in the Menu.

 I have used the code in the url(http://forums.asp.net/t/1566328.aspx) in my MVC application.My application is a Discussion Forum(in MVC) same functionality as in this forum forums.asp.net

 I have used Controllers for post, thread etc.In each controller there are some actions that are using [Authorize(Roles)] attribute

 but this coding does not count  those Actions in Controllers having Authorize attribute according to the url http://forums.asp.net/t/1566328.aspx 

 In the code, Authorize attribute is applied to Controller class, but my requirement is of Applying Authorize attribute to some actions in controller so that some are available for all users and  some links are available rolewise.Now what is the solution for that?



DropDownExtender - menu disapears


Hello all, first ever post here :)

Hope you guys can help me out, this drives me crazy...

So I got 2 updatepanels on my page. In one there is a Timer which updates for example a label. In the other one there is a dropdownextender. Everytime the timer ticks while the dropdown menu is displayed the menu disapears. I attached the sample code below....any insights on this? And yes, the dropdown and the label need to be in two seperate updatepanels....

Many thanks



<form id="form1" runat="server">

<asp:ToolkitScriptManager ID="ScriptManager1" runat="server" />

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<asp:Timer ID="Timer1" runat="server" OnTick="Timer1_Tick" Interval="4000" />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>

<asp:UpdatePanel ID="UpdatePanel2" runat="server">


Can't get an Icon to show for Desktop shortcut and Program Menu



I've created a SetupWizard, but can't get it to show the Icon for the shortcut on desktop and program menu. The installation goes fine without any errors, the only problem is the icon.

I've made a shortcut of my exe file in the Application Folder and dragged the shortcut to the Desktop folder, then on the shortcut properties, I assigned it an icon picture located in Application Folder.

Any suggestions will be very much appreciated.


help needed: Ldap User authentication using userDN and password



Is it possible to authenticate a user using userDN and password? If so, then tell me the syntax.So far i have tried to authenticate using username and password from my c# code using directoryentry which takes the parameters like domainname,username and password. But i need to authenticate using Userdn and password.

helped needed: ASP LDAP authentication failed in IE 8


I use the following code to do the user authentication through Active Directory using LDAP.

entry = new DirectoryEntry("LDAP://" + server, user_name, password);
if (!string.IsNullOrEmpty(entry.Name))
EmployeeNetId = entry.Username.Substring(0, 3);

// Retrieve EmployeeId, and Employee Full Name
EmployeeId = -1;

It works for Chrome, Firefox with no problem. But with IE 8, it works sometimes, and failed on some computers. When it failed, I figured that I need to check SSL 2.0 in IE 8 Internet Options.  It's weird because in those computers that IE 8 works, SSL 2.0 is also unchecked.

Am I using some deprecated method? Or How do I specifiy the SSL version options in the LDAP connection?

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