put these menu in .aspx page

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mirsim
Beginner
Beginner
Posts: 1
Joined: Wed Sep 08, 2004 9:10 pm

put these menu in .aspx page

Post by mirsim »

I need to know if (and how) it's possible to put the milonic menu in .aspx page.

thanks
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi,

Although I don't develop in ASP .NET, I would think that you could manage it similarly to .asp, .php, .jsp, etc. We normally refer to a file called menu_data.js: the file that contains the javascript code to define your menu styles and menus. To be able to generate the contents of the file dynamically, with any server-side scripting, you would:

(1) Name the file with the appropriate extension, e.g., menu_data.aspx

(2) In the file, put static js code along with ASP .NET code that would output the appropriate js code needed to produce your menu definitions.

(3) Load the file into your page as you would normally load a .js file (using <script> tags), e.g.:

Code: Select all

<script type="text/javascript" src="menu_data.aspx"></script>
When the page is served, the server should note the .aspx extension and run the file through the aspx parser, so that the aspx code in the file is recognized and processed. The result should be js code received in the browser that will result in the menus being created.

Since you're generating the menus dynamically, anotehr approach would be to simply embed all of the js and aspx code inline in the page. As long as your aspx code generates the correct js code for the menus, you shouldn't have a problem.

Hope that helps,

Kevin
Post Reply