Wrox Programmer Forums
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 February 18th, 2013, 10:25 PM
Authorized User
Join Date: Feb 2013
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Default $relurlnamespace$


Great book - thank you.

I am trying to build a Base Page template in a Web Application following your directions in Chapter 6 (which I realize are for a Web Site project). All seems to go well until I create the TestPage form . The Inherits value is "$relurlnamespace$_TestPage" . Can you confirm that"$relurlnamespace$" only works in a Web Site project?


Robin Howard
Old February 19th, 2013, 02:00 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi Robin,

For a Web Application Project you should be able to use rootnamespace instead of relurlnamespace. For a list of all available templates, take a look here: http://msdn.microsoft.com/en-US/library/eehb4faa.aspx


Imar Spaanjaars
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 February 19th, 2013, 08:36 PM
Authorized User
Join Date: Feb 2013
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Default Success


Thank you for your response. Yes, that works. FYI - because each page in a Web Application has a NameSpace that is inherited from the project name the Page Directive in the "Temporary.aspx" page that is used to create the template should have an Inherits attribute of "$rootnamespace$.$safeitemname$" and the class should be renamed from "Temporary" to "$safeitemname"


Last edited by rah132; February 19th, 2013 at 09:02 PM.. Reason: More Information

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