viet vo quoc

viet vo quoc

  • NA
  • 115
  • 105.5k

How to Format Menu control with data in sitemap like Html tag??

Nov 29 2011 10:35 AM
Hello everybody!
i don't know the way to convert from html tag that make the menu to Menu control in Asp.net with data from sitemap file.
I have just refer this page :http://www.dynamicdrive.com/dynamicindex1/gooeymenu.htm
to create my menu .But when i convert it into menu control ,so it's not fine and i don't know the way to add css with :ul,li,a from Html tag into menu control look  like staticMenustype and staticitemmenustyle.Someone help me about my problem!!

This is my code with html tag:

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>

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

/***********************************************
* Gooey Menu Script (c) Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

    </script>

    <link rel="stylesheet" type="text/css" href="gooeymenu.css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <ul id="gooeymenu1" class="gelbuttonmenu">
<li><a href="http://www.dynamicdrive.com/">Home</a></li>
<li><a href="http://www.dynamicdrive.com/style/">CSS Codes</a></li>
<li><a href="http://www.dynamicdrive.com/forums/">Forums</a></li>
<li><a href="http://tools.dynamicdrive.com">Tools</a></li>
<li><a href="http://www.javascriptkit.com/" class="selected">JavaScript</a></li>
<li><a href="http://www.cssdrive.com">CSS Gallery</a></li>
</ul>

<script>
gooeymenu.setup({id:'gooeymenu1', selectitem:0})
</script>
    </div>
    </form>
</body>
</html>

and this is menu control:

<div id="menu_sitemap">
         <asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1"
            Orientation="Horizontal">           
        </asp:Menu> 
        <script>
gooeymenu.setup({id:'Menu1', selectitem:1})
</script>
        <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server"
            EnableViewState="False" ShowStartingNode="False" SiteMapProvider="Menu" />


Thanks everyone!!