ASP:MENU CONTROL IN ASP.NET

Hello friends today you will learn Use of Asp: Menu control how can we use event with it and can customize it.

This control is also available in old version of Visual Studio But in VS2010 this control has a new property RenderMode(have three modes).

this control make your site look to atractive I hope will be happy with use of it’s

Step 1: Make a new Web Site As given Below in Pictures

Step 2: Now Go into Default.aspx Page’s source and Type This code

<asp:Menu ID=”Menu1″ runat=”server” Orientation=”Horizontal” Width=”100%” ForeColor=”White”
Font-Bold=”True” BackColor=”#B5C7DE” DynamicHoverStyle-BackColor=”White” StaticMenuItemStyle-HorizontalPadding=”5px”
Height=”25px” StaticHoverStyle-Font-Bold=”true” StaticMenuItemStyle-BackColor=”#C0C0C0″
DynamicHorizontalOffset=”1″ Font-Names=”Verdana” Font-Size=”X-Small” StaticSubMenuIndent=”10px”
StaticItemFormatString=”{0}” StaticMenuItemStyle-BorderColor=”YellowGreen”
StaticHoverStyle-BorderWidth=”0px” StaticHoverStyle-BorderStyle=”Ridge” Style=”background-color: #C0C0C0;
border-bottom-style: inset; border-bottom-color: Green; border-bottom-width: 3px;
border-top-color: Green; border-top-style: outset; border-top-width: 3px;”
DynamicItemFormatString=”{0}” MaximumDynamicDisplayLevels=”5″>
<StaticSelectedStyle BackColor=”#507CD1″ />
<StaticMenuItemStyle HorizontalPadding=”5px” VerticalPadding=”2px”
BackColor=”#999999″ />
<DynamicHoverStyle BackColor=”#666666″ ForeColor=”White” Font-Bold=”True” />
<DynamicMenuStyle BackColor=”#666666″ BorderColor=”#99CCFF”
BorderStyle=”Groove” BorderWidth=”2px” Height=”25px” HorizontalPadding=”5px”
VerticalPadding=”5px” />
<DynamicSelectedStyle BackColor=”Red” Font-Underline=”False”
HorizontalPadding=”2px” />
<DynamicMenuItemStyle HorizontalPadding=”5px” VerticalPadding=”2px” />
<StaticHoverStyle Font-Bold=”True” BackColor=”#284E98″ ForeColor=”White”></StaticHoverStyle>
<Items>
<asp:MenuItem Text=”Home” Value=”Home” Selected=”true” ToolTip=”click here to go on home”
ImageUrl=”~/Icons/1.png”></asp:MenuItem>
<asp:MenuItem Text=”Statements” Value=”Statements” ToolTip=”click here to go on statements”
ImageUrl=”~/Icons/2.png”></asp:MenuItem>
<asp:MenuItem Text=”Stock” Value=”Stock” ToolTip=”click here to go on stock” ImageUrl=”~/Icons/3.png”>
<asp:MenuItem Text=”GroupWise” Value=”Stock” ToolTip=”click here to go on group wise stock”
ImageUrl=”~/Icons/4.png”>
<asp:MenuItem Text=”Winter Stock(Unit No.5)” Value=”Winter” ToolTip=”click here to go on winter stock”
ImageUrl=”~/Icons/6.png”></asp:MenuItem>
<asp:MenuItem Text=”Summer Stock(Unit No.6)” Value=”Summer” ToolTip=”click here to go on summer stock”
ImageUrl=”~/Icons/6.png”></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text=”ArticleWise” Value=”Stock” ToolTip=”click here to go on article wise stock”
ImageUrl=”~/Icons/5.png”></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text=”Dispatch” Value=”Dispatch” ToolTip=”click here to go on dispatch”
ImageUrl=”~/Icons/7.png”>
<asp:MenuItem Text=”BillWise Dispatch” Value=”BillWiseDispatch” ToolTip=”click here to go on bill wise dispatch”
ImageUrl=”~/Icons/14.png”></asp:MenuItem>
<asp:MenuItem Text=”Bill Cum Material Wise Dispatch” Value=”BillCumMaterialWiseDispatch”
ToolTip=”click here to go on bill cum material wise dispatch” ImageUrl=”~/Icons/15.png”>
</asp:MenuItem>
<asp:MenuItem Text=”Group Wise Dispatch” Value=”GroupWiseDispatch” ToolTip=”click here to go on group wise dispatch”
ImageUrl=”~/Icons/16.png”></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text=”Packed Stock” Value=”PackedStock” ToolTip=”click here to go on packed stock”
ImageUrl=”~/Icons/8.png”></asp:MenuItem>
<asp:MenuItem Text=”Collection” Value=”Collection” ToolTip=”click here to go on collection”
ImageUrl=”~/Icons/9.png”>
<asp:MenuItem Text=”OurCollection” Value=”OurCollection” ToolTip=”click here to go on our collection”
ImageUrl=”~/Icons/17.png”></asp:MenuItem>
<asp:MenuItem Text=”InsertCollection” Value=”InsertCollection” ToolTip=”click here to go on insert collection”
ImageUrl=”~/Icons/18.png”></asp:MenuItem>
</asp:MenuItem>
<asp:MenuItem Text=”CForm” Value=”CForm” ToolTip=”click here to go on CForm” ImageUrl=”~/Icons/10.png”>
</asp:MenuItem>
<asp:MenuItem Text=”CreateExposer” Value=”CreateExposer” ToolTip=”click here to go on Create Exposer”
ImageUrl=”~/Icons/11.png”></asp:MenuItem>
<asp:MenuItem Text=”Enquiry” Value=”Enquiry” ToolTip=”click here to go on Enquiry”
ImageUrl=”~/Icons/12.png”></asp:MenuItem>
<asp:MenuItem Text=”AboutUs” Value=”AboutUs” ToolTip=”click here to go on about us”
ImageUrl=”~/Icons/13.png”></asp:MenuItem>
</Items>
</asp:Menu>

Step 3: Which icons are being used in this control You can dowload that from iconarcheive site or I am giving u Gallery From Can Save into Your Web In Icon folder

This slideshow requires JavaScript.

Step 4: When You Make this it will look like this

Now run Your Website and Enjoy in Programming world….

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s