You must Sign In to post a response.
  • Category: ASP.NET

    Dynamic menu

    /* client.master */
    <%@ Master Language="VB" CodeFile="Client.master.vb" Inherits="Client" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    <title>Untitled Page</title>
    <%----> horizontal menu css <--
    --%>
    <link type="text/css" href="CSS/menu.css" rel="stylesheet" />

    <script type="text/javascript" src="JS/jquery.js"></script>

    <script type="text/javascript" src="JS/menu.js"></script>

    <%----> light blue vertical menu <----%>

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>

    <script type="text/javascript" src="JS/ddaccordion.js">

    /***********************************************
    * Accordion Content script- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
    * This notice must stay intact for legal use
    ***********************************************/

    </script>

    <script type="text/javascript">


    ddaccordion.init({
    headerclass: "submenuheader", //Shared CSS class name of headers group
    contentclass: "submenu", //Shared CSS class name of contents group
    revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
    mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
    collapseprev: true, //Collapse previous content (so only one open at any time)? true/false
    defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
    onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
    animatedefault: false, //Should contents open by default be animated into view?
    persiststate: true, //persist state of opened contents within browser session?
    toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
    togglehtml: ["suffix", "<img src='plus.gif' class='statusicon' />", "<img src='minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively ["position", "html1", "html2"] (see docs)
    animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
    oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
    //do nothing
    },
    onopenclose:function(header, index, state, isuseractivated){ //custom code to run whenever a header is opened or closed
    //do nothing
    }
    })


    </script>

    <style type="text/css">
    .glossymenu
    {
    margin: 5px 0;
    padding: 0;
    width: 170px; /*width of menu*/
    border: 1px solid #9A9A9A;
    border-bottom-width: 0;
    }
    .glossymenu a.menuitem
    {
    background: black url(image/button.jpg) repeat-x bottom left;
    font: bold 14px "Lucida Grande" , "Trebuchet MS" , Verdana, Helvetica, sans-serif;
    color: white;
    display: block;
    position: relative; /*To help in the anchoring of the ".statusicon" icon image*/
    width: auto;
    padding: 4px 0;
    padding-left: 10px;
    text-decoration: none;
    }
    .glossymenu a.menuitem:visited, .glossymenu .menuitem:active
    {
    color: white;
    }
    .glossymenu a.menuitem .statusicon
    {
    /*CSS for icon image that gets dynamically added to headers*/
    position: absolute;
    top: 5px;
    right: 5px;
    border: none;
    }
    .glossymenu a.menuitem:hover
    {
    background-image: url(image/glossyback2blue.gif);
    }
    .glossymenu div.submenu
    {
    /*DIV that contains each sub menu*/
    background: white;
    }
    .glossymenu div.submenu ul
    {
    /*UL of each sub menu*/
    list-style-type: none;
    margin: 0;
    padding: 0;
    }
    .glossymenu div.submenu ul li
    {
    border-bottom: 1px solid blue;
    }
    .glossymenu div.submenu ul li a
    {
    display: block;
    font: normal 13px "Lucida Grande" , "Trebuchet MS" , Verdana, Helvetica, sans-serif;
    color: black;
    text-decoration: none;
    padding: 2px 0;
    padding-left: 10px;
    }
    .glossymenu div.submenu ul li a:hover
    {
    background: #DFDCCB;
    color: white;
    }
    </style>
    <style type="text/css">
    .style1
    {
    width: 1340px;
    }
    </style>
    <asp:ContentPlaceHolder ID="head" runat="server">
    </asp:ContentPlaceHolder>
    </head>
    <body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000"
    background="image/91.jpg">
    <form id="Form1" runat="server">
    <table>
    <tr>
    <td class="style1">
    <img src="image/logo copy.gif" alt="header" height="77" width="663" />
    </td>
    </tr>
    <tr>
    <td>
    <table style="border-bottom: ridge black">
    <tr>
    <td class="style1">
    <div id="menu">
    <ul class="menu">
    <li><a href="home.aspx"><span>Home</span></a> </li>
    <li><a href="AboutUs.aspx"><span>About US</span> </a></li>
    <li><a href="ContactUs.aspx"><span>Help</span></a></li>
    <li><a href="ContactUs.aspx"><span>Contacts</span></a></li>
    <li><a href="Feedback.aspx"><span>Feed Back</span></a></li>
    </ul>
    </div>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    <tr>
    <table width="100%">
    <tr>
    <td width="25%" rowspan="2" height="500px" valign="top">
    <div class="glossymenu">
    <a class="menuitem submenuheader" href="HomeElectricals.aspx">Electrical</a>
    <div class="submenu">
    <ul>
    <li><a href="">Wiring </a></li>
    <li><a href="">feetings </a></li>
    <li><a href="">Image CSS</a></li>
    <li><a href="">Form CSS</a></li>
    <li><a href="">DIVs and containers</a></li>
    <li><a href="">Links & Buttons</a></li>
    <li><a href="">Other</a></li>
    <li><a href="">Browse All</a></li>
    </ul>
    <a href="HomeElectricals.aspx"></a>
    <img src="image/elenew.jpg" style="margin: 10px 5px" /></a>
    </div>
    <a class="menuitem submenuheader" href="HomeInfotech.aspx">Infotech</a>
    <div class="submenu">
    <ul>
    <li><a href="">Horizontal CSS Menus</a></li>
    <li><a href="">Vertical CSS Menus</a></li>
    <li><a href="">Image CSS</a></li>
    <li><a href="">Form CSS</a></li>
    <li><a href="">DIVs and containers</a></li>
    <li><a href=""></a></li>
    <li><a href="">Other</a></li>
    <li><a href="">Browse All</a></li>
    </ul>
    <a href="InfotechHome.aspx">
    <img src="image/imagesinfo.jpg" style="margin: 10px 5px" /></a>
    </div>
    <a class="menuitem submenuheader" href="HomeAutomation.aspx">Automation</a>
    <div class="submenu">
    <%--<ul>
    <li><a href="">CSS Gallery</a></li>
    <li><a href="">Menu Gallery</a></li>
    <li><a href="">Web Design News</a></li>
    <li><a href="">CSS Examples</a></li>
    <li><a href="">CSS Compressor</a></li>
    <li><a href="">CSS Forums</a></li>
    </ul>--%>
    <ul>
    <% If objdatatable.Tables(0).Rows.Count > 0 Then
    For Each row As DataRow In objdatatable.Tables(0).Rows

    %>
    <img src="<% Response.Write(row("SubCategoryName").ToString)%>" alt="" width=100 height=100 />
    <li><a href=""><% Response.Write(row("SubCategoryName").ToString)%></a></li>
    <% Next%>
    <% End If%>
    </ul>
    <a href="HomeAutomation.aspx">
    <img src="image/icon_Automation.jpg" style="margin: 10px 5px" /></a>
    </div>
    </div>
    </td>
    <td width="60%" rowspan="2">
    <asp:ContentPlaceHolder ID="contentplaceholder1" runat="server">
    </asp:ContentPlaceHolder>
    </td>
    <td width="15%" valign="top" height="100px">
    <div align="center" height="100px">
    <img src="image/button.jpg" height="31" width="175">
    <marquee scrollamount="2" direction="down" loop="true" width="100%" height="200px"> <center>
    <font color="white" face="verdana" size="1">
    <strong> THIS
    Parsons </br> has successfully </br>provided quality design, </ br>rconstruction, service</br> and maintenance to our </br>customers. We are pleased </br>to offer a broad range of </br>services through our three operating</br> divisions: Electrical, Auto andmation</br> Infotech Service<br>
    <img src=
    "image/infotechhome.jpg" alt="" /><br> </strong></font> </center> </marquee>
    </div>
    </td>
    </tr>
    <%--<tr>
    <td width="15%" valign ="top" align ="center" >

    <img src="image/button.jpg" height="31" width="175">
    <table border="1px" style="border-style :ridge ">
    <tr>
    <td>
    <asp:Label ID="Label1" runat="server" Text="User Name"></asp:Label>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <asp:Label ID="Label2" runat="server" Text="Passward"></asp:Label>
    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    </td>
    </tr>
    </table>

    </td>
    </tr>
    --%>
    </table>
    </tr>
    </table>
    </form>
    </body>
    </html>

    /* client.master.vb */

    Partial Class Client
    Inherits System.Web.UI.MasterPage
    Public objdatatable As DataSet

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    Try
    If Not IsPostBack Then
    objdatatable = util.getdataset("select * from tblsubcategory where MainCategoryID=8")
    If objdatatable.Tables(0).Rows.Count > 0 Then

    End If
    End If
    Catch ex As Exception

    End Try

    End Sub
    End Class
  • #493897
    * client.master.vb */

    Partial Class Client
    Inherits System.Web.UI.MasterPage
    Public objdatatable As DataSet
    Public objdatatable1 As DataSet
    Public objdatatable2 As DataSet

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load


    Try
    If Not IsPostBack Then
    objdatatable = util.getdataset("select * from tblsubcategory where MainCategoryID=8")
    If objdatatable.Tables(0).Rows.Count > 0 Then

    End If

    objdatatable1 = util.getdataset("select * from tblsubcategory where MainCategoryID=9")
    If objdatatable.Tables(0).Rows.Count > 0 Then

    End If

    objdatatable = util.getdataset("select * from tblsubcategory where MainCategoryID=10")
    If objdatatable.Tables(0).Rows.Count > 0 Then

    End If

    End If
    Catch ex As Exception

    End Try

    End Sub
    End Class

    Pratik
    Beleive in YourSelf
    http://www.PaisaLive.com/register.asp?397607-8313717">

  • #493905
    what is the problem here?????
    Thanks & Regards
    Anil Kumar Pandey
    Microsoft MVP, DNS MVM

  • #493960
    Hi,

    1. Unable to understand what you want to ask in question?
    2. If you want to create dynamic menu you can refer to the link:
    http://www.dotnetspider.com/resources/37392-Designing-Menu-bar-Asp-Net.aspx

    (dont forget to rate)
    Thanks and Regards,
    Vikram Singh Saini

    RESULTS MATTER, REASONS NOT!

  • #494361
    thanx


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.