How to create menu in ?

Posted by Ranjeet_8 under ASP.NET category on | Points: 40 | Views : 1282
protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
lblmsg.Text = Menu1.SelectedValue;

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">
<html xmlns="">
<head id="head1" runat="server">
<style type="text/css">
color: #000000;
border: Solid 1px Gray;
background-color: #C5C5C5;
padding: 2px 5px;
<title>ASP.Net Menu</title>
<form id="form1" runat="server">
<asp:Menu ID="Menu1" OnMenuItemClick="Menu1_MenuItemClick" Orientation="Horizontal"
StaticMenuItemStyle-CssClass="menu" DynamicMenuItemStyle-CssClass="menu" runat="server">
<asp:MenuItem Text="Colors">
<asp:MenuItem Text="Red" />
<asp:MenuItem Text="Blue" />
<asp:MenuItem Text="Green" />
<asp:MenuItem Text="Products">
<asp:MenuItem Text="Products_Details">
<asp:MenuItem Text="Sub_Products1" />
<asp:MenuItem Text="Sub_Products2" />
<hr />
<asp:Label ID="lblmsg" EnableViewState="false" runat="server" />

Comments or Responses

Login to post response