Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 15th, 2009, 09:56 AM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default Question

Imar,

On your website, imar.spaanjaars.com, how did you achieve the rounded corners for your horizontal menu using the menu control? I know you have graphical images but I'm stuck on how to actually write the code to achieve it.


Thanks
Reply With Quote
  #2 (permalink)  
Old May 15th, 2009, 12:24 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You'd be surprised how ugly it is... ;-)

it's just a User Control with a bunch of <asp:Image> controls wrapped in <asp:HyperLink> controls....


Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old May 15th, 2009, 01:05 PM
Authorized User
 
Join Date: Apr 2008
Location: , , .
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Default

could you give me an example? :-) Thanks

been stuck on it for awhile. I know how to do it with traditional methods but not with the use of controls.
Reply With Quote
  #4 (permalink)  
Old May 15th, 2009, 04:46 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

It's nothing more than this:
Code:
 
<asp:HyperLink ID="HyperHome" Runat="server">
   <asp:Image ID="MenuHome" Runat="server" ToolTip="Go back ..." />
</asp:HyperLink>
<asp:HyperLink ID="HyperBlogs" Runat="server">
  <asp:Image ID="MenuBlogs" Runat="server" ToolTip="Go to the ... " />
</asp:HyperLink>
...
Then in code behind I set the URLs based on some condition, or hide controls:

HyperHome.NavigateUrl = "~/";
// Others go here
HyperAdmin.Visible = Some condition to check the user.

In my case, I added them to a User Control which I then added to a Master Page. But just as easy I could have added them to the MasterPage directly.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
I have one question Dusmanta Forum and Wrox.com Feedback 1 February 3rd, 2009 08:40 AM
question skoob1152 C++ Programming 0 June 6th, 2006 05:53 PM
Question? Calibus Classic ASP Databases 8 August 6th, 2004 08:25 AM
c++ question amahja56 C++ Programming 3 February 24th, 2004 02:45 PM



All times are GMT -4. The time now is 09:07 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.