Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 15th, 2009, 09:56 AM
Authorized User
 
Join Date: Apr 2008
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
 
Old May 15th, 2009, 12:24 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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!
 
Old May 15th, 2009, 01:05 PM
Authorized User
 
Join Date: Apr 2008
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.
 
Old May 15th, 2009, 04:46 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 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!





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





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