Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Reply
Basic ASP.net theory question, centralized menu
Old 06-17-2008, 12:37 PM Basic ASP.net theory question, centralized menu
houdini987's Avatar
Extreme Talker

Posts: 155
Name: Brian Trudeau
Location: Enfield, CT
Trades: 2
I want to write some simple menu code that all my pages can refer to (so if I add a page or modify the menu, I don't have to do it 100 times).

Are there any tutorials out there that help with a simple function like this?

Thanks!
__________________
Trudeau Consulting LLC

Please login or register to view this content. Registration is FREE
houdini987 is offline
Reply With Quote
View Public Profile Visit houdini987's homepage!
 
 
Register now for full access!
Old 06-17-2008, 05:00 PM Re: Basic ASP.net theory question, centralized menu
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,522
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
http://www.candsdesign.co.uk/articles/coding/includes/

it's exactly the same in ASP.NET as it is in ASP
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 06-17-2008, 07:56 PM Re: Basic ASP.net theory question, centralized menu
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Public Static Shared Class MyMenuGenerator

Public Static Shared Sub Render

Response.Write "Here go the menu codes!"

End Sub

End Class

---------------------------------

MyMenuGenerator.Render()
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Last edited by Learning Newbie; 06-19-2008 at 02:31 PM.. Reason: code was WRONG - fixing
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-19-2008, 02:34 PM Re: Basic ASP.net theory question, centralized menu
Learning Newbie's Avatar
Defies a Status

Latest Blog Post:
Astounding Republican Paranoia
Posts: 5,662
Name: John Alexander
Trades: 0
Argh!!! Static is C#, the VB way to do that is Shared. On that note, anyone know how to make strike through text?

I just wanted to point out, in VB 6 a shared method or class or member variable was pain. That was because of a limitation in VB 6 itself and or in COM. This isn't a problem anymore in .NET. In fact, it's quite the opposite. Calling a static method means the framework doesn't have to do null checks on the object, and the same goes for a static class. Plus, of course, you don't have to actually create an instance. So, for two reasons, it's actually faster under ASP.NET to use static classes and methods, if they're truly stateless.

Just wanted to point that out for anyone reading this thread, who might be curious and moving from ASP to ASP.NET.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
Learning Newbie is offline
Reply With Quote
View Public Profile
 
Old 06-19-2008, 07:12 PM Re: Basic ASP.net theory question, centralized menu
RabidSniper's Avatar
Skilled Talker

Posts: 57
Name: Jesse
Location: Phoenix, AZ
Trades: 0
What... you guys arent hip on the <ASP:Menu /> control?

Its not everything for everyone, but it does basic site menuing and breadcrumbing very easily... and works using the Menu provider structure so you can plop in more elaborate Menu implementations later on when you get more time or money.

http://quickstarts.asp.net/QuickStar...tion/menu.aspx
RabidSniper is offline
Reply With Quote
View Public Profile
 
Old 06-24-2008, 12:17 AM Re: Basic ASP.net theory question, centralized menu
Junior Talker

Posts: 4
Trades: 0
Master Pages / User Controls.....

If you're just doing it for a menu, create a User Control...

Or better yet include a user control on your master page :P
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
seanxe is offline
Reply With Quote
View Public Profile
 
Old 08-30-2008, 07:25 AM Re: Basic ASP.net theory question, centralized menu
Super Talker

Posts: 102
Trades: 0
There is a menu option is available in Dot NET and formating containts also available in this menu property
__________________

Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
John_audson is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Basic ASP.net theory question, centralized menu
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.34861 seconds with 12 queries