<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>WilsonDotNet Forums : Page Templates</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=rss&amp;id=19&amp;key=n%2fCFdH5epOsCCurFZ2RkCA%3d%3d</link><description>WilsonDotNet Forums : Page Templates</description><item><title>Inline Code (i.e. No Codebehind) and Wilson's Master Pages (.Net 1.1)</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2514&amp;key=dbQPmRU%2bSqBla5ORSiRnZQ%3d%3d&amp;post=7594</link><pubDate>Tue, 01 May 2007 22:59:18 GMT</pubDate><description>&lt;P&gt;The honest answer -- host somewhere else.&amp;nbsp; WebHost4Life is very cheap and reliable, as are others.&lt;/P&gt;
&lt;P&gt;Thanks, Paul Wilson&lt;/P&gt;</description></item><item><title>Inline Code (i.e. No Codebehind) and Wilson's Master Pages (.Net 1.1)</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2514&amp;key=dbQPmRU%2bSqBla5ORSiRnZQ%3d%3d&amp;post=7582</link><pubDate>Tue, 01 May 2007 22:57:49 GMT</pubDate><description>&lt;P&gt;Hi everyone,&lt;/P&gt;
&lt;P&gt;I'm using .Net 1.1 to create a c# web application... and I want to use Wilson's Master Pages.&amp;nbsp; The problem is, I'm planning on hosting it on Brinkster which does not allow codebehind/dlls.&amp;nbsp; So I need help with "converting" the free Wilson's Master Pages source code to inline-code... if that's even possible.&lt;/P&gt;
&lt;P&gt;Normally, with Master Pages you need the register directive to register the Master Pages assembly/namespance:&lt;BR&gt;[CODE]&amp;lt;%@ Register TagPrefix="Wilson" Assembly="WilsonMasterPages" Namespace="Wilson.MasterPages" %&amp;gt;[/CODE] &lt;BR&gt;which contains the following two classes:&lt;BR&gt;[CODE]public class MasterPage : System.Web.UI.HtmlControls.HtmlContainerControl&lt;BR&gt;public class ContentRegion : System.Web.UI.WebControls.Panel[/CODE]&lt;/P&gt;
&lt;P&gt;Is there an easy (or relatively easy) way to do this?&lt;/P&gt;
&lt;P&gt;TIA&lt;/P&gt;</description></item><item><title>WilsonOrMapper templates do not work in CodeSmith V4.0</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2455&amp;key=aL1Vwbqw4MK7uB%2bYHv33Ng%3d%3d&amp;post=7418</link><pubDate>Tue, 23 Jan 2007 03:21:01 GMT</pubDate><description>&lt;P&gt;Sorry it was my mistake. I had the wrong version of the dll.&lt;/P&gt;
&lt;P&gt;It is running fine now.&lt;/P&gt;
&lt;P&gt;Shailen Sukul&lt;/P&gt;</description></item><item><title>WilsonOrMapper templates do not work in CodeSmith V4.0</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2455&amp;key=aL1Vwbqw4MK7uB%2bYHv33Ng%3d%3d&amp;post=7417</link><pubDate>Tue, 23 Jan 2007 03:02:42 GMT</pubDate><description>&lt;P class=ForumPostContentText&gt;Hi,&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;&amp;nbsp;I just got your trial version (V4) and generated some code using the WilsonOrMapper template for a really simple database. &lt;/P&gt;
&lt;P class=ForumPostContentText&gt;I have the latest version of the WilsonORMapper dll that I purchased.&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;The generated code gives this compile error on this line:&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;&lt;STRONG&gt;Line:&lt;/STRONG&gt; &lt;FONT color=#0000ff size=2&gt;private&lt;/FONT&gt;&lt;FONT size=2&gt; ObjectHolder&amp;lt;&lt;/FONT&gt;&lt;FONT color=#008080 size=2&gt;Address&lt;/FONT&gt;&lt;FONT size=2&gt;&amp;gt; _addressAddressObject;&lt;/P&gt;&lt;/FONT&gt;
&lt;P class=ForumPostContentText&gt;&lt;STRONG&gt;Error:&lt;/STRONG&gt; Error&amp;nbsp;1&amp;nbsp;The non-generic type 'Wilson.ORMapper.ObjectHolder' cannot be used with type arguments&amp;nbsp;C:\temp\WORM\Code\Customer.Generated.cs&amp;nbsp;71&amp;nbsp;11&amp;nbsp;Wilson&lt;BR&gt;&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;Upon disassembling the dll, it seems that Wilson.ORMapper.ObjectHolder is indeed not a generic clas:&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;
&lt;TABLE class="" style="MARGIN-BOTTOM: 0px" cellSpacing=0 cellPadding=0&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD class="" style="PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 4px; PADDING-TOP: 4px" colSpan=2&gt;&lt;PRE&gt;&lt;FONT color=#1000a0&gt;public&lt;/FONT&gt; &lt;FONT color=#1000a0&gt;class&lt;/FONT&gt; &lt;B&gt;ObjectHolder&lt;/B&gt; : &lt;A title=Wilson.ORMapper.ILoadOnDemand href="http://www.aisto.com/roeder/dotnet/Default.aspx?Object=1"&gt;&lt;FONT color=#006018&gt;ILoadOnDemand&lt;/FONT&gt;&lt;/A&gt;
{
&lt;/PRE&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;.....&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;It seems that I am missing the latest dll. Does anyone know where to find this.&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;I checked the Wilson website and there are no updates.&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;PS I will be cross-posting this on the Wilson forum as well.&lt;/P&gt;
&lt;P class=ForumPostContentText&gt;&amp;nbsp;Thanks.&lt;/P&gt;
&lt;DIV class=ForumPostContentText&gt;
&lt;DIV class=ForumPostContentText&gt;&lt;STRONG&gt;PS: CodeSmith Post Url &lt;/STRONG&gt;&lt;A href="http://community.codesmithtools.com/forums/21722/ShowThread.aspx#21722"&gt;http://community.codesmithtools.com/forums/21722/ShowThread.aspx#21722&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=ForumPostContentText&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;
&lt;DIV class=ForumPostContentText&gt;
&lt;HR align=left width="25%" SIZE=1&gt;
&lt;/DIV&gt;
&lt;DIV class=ForumPostContentText&gt;With Regards&lt;BR&gt;&lt;BR&gt;Shailen Sukul (Software Architect/Developer)&lt;BR&gt;BSc Mcpd Mcsd.Net Mcsd Mcad&lt;BR&gt;&lt;BR&gt;&lt;A href="http://www.ashlen.net.au"&gt;http://www.ashlen.net.au&lt;/A&gt;&lt;BR&gt;&lt;/DIV&gt;</description></item><item><title>WilsonORMapper Vs NHibernate</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2420&amp;key=8OeIbtDOHSqAABQaudyc4g%3d%3d&amp;post=7373</link><pubDate>Mon, 18 Dec 2006 00:37:20 GMT</pubDate><description>&lt;P&gt;Hi Hari:&lt;/P&gt;
&lt;P&gt;I generally believe that (1) if you have a tool you're satisfied with then don't bother, and (2) if you aren't then evaluate a couple that claim to meet your needs and pick the one that best fits your style.&amp;nbsp; So if you're already using NHibernate and aren't missing any needed features, then why would you bother with the learning curve of another mapper, even if it may be "better" in some way.&amp;nbsp; On the other hand, if you're missing something, like stored procs, or aren't happy for some reason, maybe too complex, than try mine for yourself and see if it fits "better".&amp;nbsp; I've generally tried to avoid making a bullet list of features that I may have and others don't because I may simply not know enough about the others and things change, but my &lt;A href="http://www.ORMapper.net"&gt;http://www.ORMapper.net&lt;/A&gt; site has a decent list of features and maybe you can draw your own conclusions.&amp;nbsp; I do usually claim that my mapper is one of the simplest, both to use and to extend, and most flexible, but in the end if you already know NHibernate then there will of course be a learning curve.&lt;/P&gt;
&lt;P&gt;Thanks, Paul Wilson&lt;/P&gt;</description></item><item><title>WilsonORMapper Vs NHibernate</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2420&amp;key=8OeIbtDOHSqAABQaudyc4g%3d%3d&amp;post=7344</link><pubDate>Mon, 18 Dec 2006 00:26:12 GMT</pubDate><description>&lt;P&gt;I never used wilsonORMapper as I always used NHibernate. Can you please let me know what additional features does wilsonORMapper offer than NHIbernate. I am sorry that I am asking this question even without evaluating the WilsoORMapper. Thought you could provide a quick overriew so that I can get a lead on evaluating the Mapper.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks Hari&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description></item><item><title>Base classes for masterpages and content pages</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2158&amp;key=zaYsbn6dsu7f4AsN%2bjkKng%3d%3d&amp;post=6707</link><pubDate>Tue, 23 May 2006 13:43:33 GMT</pubDate><description>Hi Mark:&lt;br&gt;&lt;br&gt;There are a couple of possibilities, depending on where it makes the most sense.&amp;nbsp; If the common properties belong most on your base page, then accessing them from anywhere else (page or master) is as simple as casting the Page property to the appropriate type.&amp;nbsp; If the common properties belong most on your master page, then you can use something like the following:&amp;nbsp; http://weblogs.asp.net/pwilson/archive/2004/01/12/57791.aspx.&amp;nbsp; Something else that might make sense is to put the common properties in a separate "settings" class that can more easily be accessed from any other class as needed.&lt;br&gt;&lt;br&gt;Thanks, Paul Wilson&lt;br&gt;</description></item><item><title>Base classes for masterpages and content pages</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2158&amp;key=zaYsbn6dsu7f4AsN%2bjkKng%3d%3d&amp;post=6697</link><pubDate>Tue, 23 May 2006 13:33:22 GMT</pubDate><description>&lt;P&gt;Hi Paul&lt;/P&gt;
&lt;P&gt;So -&amp;nbsp;Im using master pages and regular content pages.&amp;nbsp; My content pages inherit from a base class, so far Im not bothering doing so with my master page (althought I suspect I will have &amp;gt;1 so this&amp;nbsp;too will change).&lt;/P&gt;
&lt;P&gt;Anyhow, there are properties I want to expose to both (such as sesson variables) and Im sure you can see where this is headed - they dont inherit from the same &lt;STRONG&gt;system.web.ui&lt;/STRONG&gt;&amp;nbsp; class.&lt;/P&gt;
&lt;P&gt;Thoughts?&amp;nbsp; Im thoroughly addicted to inheriting from base classes.&lt;/P&gt;
&lt;P&gt;Thanks, Mark&lt;/P&gt;</description></item><item><title>Dynamically-Loaded Template controls that are conditional on properties</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=2101&amp;key=NwqxP4Mscn%2fJVn06ePPKHw%3d%3d&amp;post=6536</link><pubDate>Sat, 22 Apr 2006 00:22:35 GMT</pubDate><description>&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;I'm writing to post a solution I've found to a problem I was having.&amp;nbsp;A UserControl referencing a MasterPage template for its layout&amp;nbsp;needed to evaluate&amp;nbsp;one&amp;nbsp;of its public properties to determine which child controls to add to a specific ContentRegion.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;Ordinarily, the optimal time to modify the controls collection of the ContentRegions is during the overridden &lt;FONT size=2&gt;AddParsedSubObject() method, but in this phase of the UserControl's lifecycle, its public properties aren't instantiated yet, so its value is still unknown. Furthermore, there didn't seem to be a time at which the Property value was accessible that wasn't too late to make changes to the ContentRegion.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT size=2&gt;So here's what I did instead, which worked like a charm:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;PRE&gt;protected override void AddParsedSubObject(object obj)
{
	if (obj.GetType() == typeof(Wilson.MasterPages.MasterPage))
	{
		Panel pnlZoneBottom2 = new Panel();
		pnlZoneBottom2.Load +=new EventHandler(pnlZoneBottom2_Load);
		wcZoneBottom.Controls.Add(pnlZoneBottom2);
	}
	base.AddParsedSubObject (obj);
}

private void pnlZoneBottom2_Load(object sender, EventArgs e)
{
Panel pnlZoneBottom2 = (Panel)sender;
if (this.FixedIncome == true)		//It's a bond
{
	//	PortfolioBondCreditQuality
					UserControls.Portfolio.PortfolioBondCreditQuality ucBCQ = (UserControls.Portfolio.PortfolioBondCreditQuality)GetControl("~/UserControls/Portfolio/PortfolioBondCreditQuality.ascx");
	pnlZoneBottom2.Controls.Add(ucBCQ);

	//	KeyFundStatistics
	UserControls.Portfolio.PortfolioBondStatistics ucPBS = (UserControls.Portfolio.PortfolioBondStatistics)GetControl("~/UserControls/Portfolio/PortfolioBondStatistics.ascx");
	pnlZoneBottom2.Controls.Add(ucPBS);
}
else
{
	//	Top 10 Holdings
	UserControls.Snapshot.Holdings ucHoldings = (UserControls.Snapshot.Holdings)GetControl("~/UserControls/Snapshot/Holdings.ascx");
	pnlZoneBottom2.Controls.Add(ucHoldings);

	//	Sector Allocations
	UserControls.Snapshot.SectorAllocations ucAlloc = (UserControls.Snapshot.SectorAllocations)GetControl("~/UserControls/Snapshot/SectorAllocations.ascx");
	pnlZoneBottom2.Controls.Add(ucAlloc);				
}

}
&lt;/PRE&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT size=2&gt;By the time the pnlZoneBottom2.Load event is called, the UserControl has already been initialized, so its properties have values. &lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Verdana size=2&gt;&lt;FONT size=2&gt;Feedback/Critiques/Suggestions appreciated!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Sabrina Veksler&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;Software Engineer, Product Development&lt;/SPAN&gt;&lt;BR&gt;&lt;SPAN style="FONT-SIZE: 7.5pt; FONT-FAMILY: Verdana"&gt;MarketWatch Licensing Services&lt;/SPAN&gt; &lt;BR&gt;</description></item><item><title>Changing Template at run-time</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=230&amp;key=k%2fCsmVjyJ44m7uU%2b0H7zZQ%3d%3d&amp;post=6336</link><pubDate>Wed, 22 Mar 2006 01:07:16 GMT</pubDate><description>&lt;P&gt;This thread also helped me. Just wanted to say thanks to everyone who posted!&lt;/P&gt;
&lt;P&gt;Tim&lt;/P&gt;</description></item><item><title>change style sheet dynamically</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1923&amp;key=NN1eJ%2fZutN5sfgTZSWyBOQ%3d%3d&amp;post=6014</link><pubDate>Sun, 19 Feb 2006 14:56:30 GMT</pubDate><description>Hi Dieter:&lt;br /&gt;
&lt;br /&gt;
ASP.NET tries to support the classic ASP style render blocks, but it cannot do so in all cases and thus the ASP.NET team does not recommend that you use them anymore.  In other words, they represent the old-style top-down rendering code instead of the new-style control architecture -- and as such they just aren't guaranteed to work in all cases (and no promise is made that they will work at all in future versions).&lt;br /&gt;
&lt;br /&gt;
So how do you handle this?  One way would be to put a Literal control in that location, another would be to make the link tag into a control by adding runat=server, and still another would be to use the data-binding syntax instead.  You could even override the page's Render method and parse/modify this on the fly.  Finally, it may not be an option for you, but ASP.NET v2.0 supports the entire head section being a special built-in server control, and themes make changing stylesheets trivial.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson&lt;br /&gt;
&lt;br /&gt;
</description></item><item><title>change style sheet dynamically</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1923&amp;key=NN1eJ%2fZutN5sfgTZSWyBOQ%3d%3d&amp;post=6012</link><pubDate>Sun, 19 Feb 2006 14:27:56 GMT</pubDate><description>Hi, &lt;br /&gt;
&lt;br /&gt;
I've got slight problem with the template and changing the style sheet during runtime. I'm using URL Rewriting, hence the   path to the css file changes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;link href=&amp;quot;&amp;lt;%= Request.ApplicationPath %&amp;gt;/css/view.css&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This works fine when I use a normal webform (aspx), but when I put this code into the template.ascx it throws an error --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Controls collection cannot be modified because the control contains code blocks (i.e. &amp;lt;% ... %&amp;gt;). &lt;br /&gt;
&lt;br /&gt;
Any help on that?&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Regards, Dieter&lt;br /&gt;
</description></item><item><title>Cannot get master pages working</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1874&amp;key=ssm2PNnJ61ZABvfdhuAFJw%3d%3d&amp;post=5849</link><pubDate>Wed, 01 Feb 2006 03:39:32 GMT</pubDate><description>First, there is not other version of my MasterPages -- it has never needed an update.  The subscriber code is packaged slightly differently, so it may be technically different, but its not different in functionality or features in any way.&lt;br /&gt;
&lt;br /&gt;
Now for your question -- you do need to have the runat=server tag on contentregions.  Any content that you put inside one of those regions in the master page template will only be part of the final page if that region is NOT overriden in that final page.  In other words it is default content only -- once you override the region in your page then that content will no longer be used.&lt;br /&gt;
&lt;br /&gt;
The other factor is that my MasterPages has a concept of a default region also, which makes it a little easier by not requiring you to explicitly override that region in your pages.  Instead anything that is put in your page between the masterpage declaration is automatically assumed to be part of the default region unless you explicitly declare another region.  What does this have to do with your question?  The default region ends up always being overriden, so any default content you supplied in the master template for the default region will never be used -- and that sounds like what you are experiencing here.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Cannot get master pages working</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1874&amp;key=ssm2PNnJ61ZABvfdhuAFJw%3d%3d&amp;post=5848</link><pubDate>Wed, 01 Feb 2006 03:31:35 GMT</pubDate><description>I have created my master page successfully.&lt;br /&gt;
I can even get it to display BUT it will not display&lt;br /&gt;
if I make the Wilson:ContentRegion a server control.&lt;br /&gt;
&lt;br /&gt;
For obvious reasons, I want programmatic access to content regions.&lt;br /&gt;
&lt;br /&gt;
My page implementation is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;wilson:masterpage masterpagefile=&amp;quot;~/UserControls/MasterPages/Default.ascx&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;wilson:contentregion id=&amp;quot;MPContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;THIS CONTENT WILL NOT DISPLAY WHEN THE&lt;br /&gt;
CONTENT REGION IS MADE INTO A SERVER CONTROL!!!!&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;I assume when I remove the runat=&amp;quot;server&amp;quot; command&lt;br /&gt;
it is not operating as expected!&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/wilson:contentregion&amp;gt;&lt;br /&gt;
&amp;lt;/wilson:masterpage&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Where can I download the latest WilsonMasterPages&lt;br /&gt;
assembly from? I assume their is a refined version&lt;br /&gt;
from the one listed on ASPAlliance.</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5781</link><pubDate>Tue, 24 Jan 2006 16:41:20 GMT</pubDate><description>Per CSS standards, any images referred to _IN_ a CSS file are relative to where the CSS file was loaded from, so you should NOT use full paths NOR fix-up paths.  The only gotcha is that IE 6 doesn't load behaviors from the relative path... but nobody uses those, right? :)&lt;br /&gt;
&lt;br /&gt;
So, put the icons directory under the CSS directory for any images references IN the CSS and then use this syntax:&lt;br /&gt;
&lt;br /&gt;
background-image: url(icons/delete.gif);&lt;br /&gt;
&lt;br /&gt;
Marc</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5777</link><pubDate>Tue, 24 Jan 2006 13:40:13 GMT</pubDate><description>I think that's simply something you'll have to avoid unless you want to get into dynamically creating your stylesheets.  You could also easily render some styles in your page itself instead of using the sytlesheet for that information.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5776</link><pubDate>Tue, 24 Jan 2006 13:28:08 GMT</pubDate><description>One additional question, within my style sheet I have references to images using the application name eg.&lt;br /&gt;
background-image: url(/WebApp/Images/Interface/icons/delete.gif);&lt;br /&gt;
How would I resolve the url to this directory without hardcoding the App Name ? Any ideas ?</description></item><item><title>Visual Studio 2005 MasterPage Designer Win Error</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1852&amp;key=Kqi4N2HyDLe2%2fuP9KswYwg%3d%3d&amp;post=5758</link><pubDate>Sun, 22 Jan 2006 08:22:28 GMT</pubDate><description>Hey Tim:&lt;br /&gt;
&lt;br /&gt;
Yes, I believe there are some designer changes that have affected several of my controls when moving from v1 to v2.  But for MasterPages the solution is to move to the built-in MasterPages for ASP.NET v2.0 -- don't keep using mine anymore.  If you can't afford the change then as you've noticed it will still work at runtime, but its not very hard to convert to the new MasterPages from mine, and its well worth that effort.  Will I put out an update of mine?  No -- there's just no reason to since once you switch to v2.0 then you really should be switching to the real deal.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Visual Studio 2005 MasterPage Designer Win Error</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1852&amp;key=Kqi4N2HyDLe2%2fuP9KswYwg%3d%3d&amp;post=5757</link><pubDate>Sat, 21 Jan 2006 11:52:05 GMT</pubDate><description>Hello Paul,&lt;br /&gt;
&lt;br /&gt;
I have been using your MasterPages concept and code with Visual Studio (VS) 2003 and .NET Framework 1.1. for about two years now. It has worked well but now I have a problem since I upgraded to VS 2005 and .NET Framework 2.0.&lt;br /&gt;
&lt;br /&gt;
The problem is that the MasterPages custom control now displays an error in the designer window. The error message is 'Object reference not set to an instance of an object'. However when trying to resolve this issue I also got this message &amp;quot;Unable to cast object of type 'System.Web.UI.Disign.HtmlIntrinsicControlDesigner' to type 'System.Web.UI.Design.ControlDesigner'. Apparently the VS 2005 designer window does not accept a custom control in which it is inherited from the HtmlContainerControl class.&lt;br /&gt;
 &lt;br /&gt;
The application still compiles and appears to function properly but the designer window is now pretty much useless.&lt;br /&gt;
&lt;br /&gt;
Do you have any ideas on how to resolve this problem.&lt;br /&gt;
&lt;br /&gt;
Tim</description></item><item><title>Mater Pages Demo...</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=79&amp;key=ZZ2PXPxb%2br95mCEawX%2bSfQ%3d%3d&amp;post=5624</link><pubDate>Wed, 04 Jan 2006 03:32:37 GMT</pubDate><description>My version for ASP.NET v1.* is at http://authors.aspalliance.com/PaulWilson/Articles/?id=14.  MS has lots of resources for ASP.NET v2.0 at http://www.asp.net.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Mater Pages Demo...</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=79&amp;key=ZZ2PXPxb%2br95mCEawX%2bSfQ%3d%3d&amp;post=5623</link><pubDate>Wed, 04 Jan 2006 03:27:48 GMT</pubDate><description>Hi Paul...&lt;br /&gt;
&lt;br /&gt;
I want a Demo of Master Page for ASP.NET... Can u help me if its possible.... if u have any like of nice project demo then plz help us....&lt;br /&gt;
&lt;br /&gt;
John....</description></item><item><title>Page Width Issues</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1740&amp;key=W%2bGe2dJ4OVzFgePtxii8ug%3d%3d&amp;post=5433</link><pubDate>Wed, 07 Dec 2005 14:02:50 GMT</pubDate><description>MasterPages doesn't change or set any widths (or any other attributes for that matter), so I'm not sure what you are experiencing, nor have I seen or heard of anything like this.  My only thought is that maybe you are using grid layout, or some other css positioning that is assuming the wrong final container, in which case you should switch to flow layout.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Page Width Issues</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1740&amp;key=W%2bGe2dJ4OVzFgePtxii8ug%3d%3d&amp;post=5432</link><pubDate>Wed, 07 Dec 2005 13:07:01 GMT</pubDate><description>Hello, &lt;br /&gt;
&lt;br /&gt;
I am using your Master Pages on a site, and they've worked great overall.  However, I seem to be running into some issues with the page width getting screwed up based on content.  &lt;br /&gt;
&lt;br /&gt;
For instance, lets say I have a master page with a content cell that's 400px wide.  In the content page I have a table that's say 200px wide.  This table should easily fit, but the content space gets over-expanded as if its too wide unless I set my inner table's width to 100%.  I run into the same issue with drop-downs, and images.  I have found that setting width to 100% seems to fix tables and drop-downs, but I don't understand why.  &lt;br /&gt;
&lt;br /&gt;
Any suggestions?   </description></item><item><title>Unable to get values from controls</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=320&amp;key=ni37FNpIJjuV%2bfN83juhPQ%3d%3d&amp;post=5207</link><pubDate>Fri, 04 Nov 2005 17:49:36 GMT</pubDate><description>First, why are you using Request.Form?  In almost all cases you should be simply using textbox1.Text.  The exception is a few rare cases where you need a posted value earlier in the page lifecycle (like in the Init method), but in almost all cases that's a sign of a poor design.&lt;br /&gt;
&lt;br /&gt;
So now to answer your question, since there are those rare occasions -- use Request.Form[textbox1.ClientId].  The actual ClientId will not be just &amp;quot;textbox1&amp;quot;, since it will be scoped to the various containers on your page to guarantee unique names.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Unable to get values from controls</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=320&amp;key=ni37FNpIJjuV%2bfN83juhPQ%3d%3d&amp;post=5206</link><pubDate>Fri, 04 Nov 2005 16:58:07 GMT</pubDate><description>I have the same problem.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have a problem in working with forms while using master pages.&lt;br /&gt;
Normally without master page decleration, i can get a value by using &lt;br /&gt;
&lt;br /&gt;
Request.Form[&amp;quot;something&amp;quot;];&lt;br /&gt;
&lt;br /&gt;
,but if i use master pages, this returns NOTHING!!&lt;br /&gt;
&lt;br /&gt;
Below is a sample code, i try to google but couldn't get any answer &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
test.aspx&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%@ Page Language=&amp;quot;C#&amp;quot; MasterPageFile=&amp;quot;Test.master&amp;quot;%&amp;gt;&lt;br /&gt;
&amp;lt;%@ MasterType virtualPath=&amp;quot;~/Test.master&amp;quot;%&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script runat=&amp;quot;server&amp;quot; language=&amp;quot;c#&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
public void DoTest(object sender, System.EventArgs e)&lt;br /&gt;
{&lt;br /&gt;
Response.Write (Request.Form[&amp;quot;textbox1&amp;quot;]);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;asp:Content ID=&amp;quot;mainContent&amp;quot; ContentPlaceHolderID=&amp;quot;mainContent&amp;quot; Runat=&amp;quot;server&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;asp:TextBox id=&amp;quot;textbox1&amp;quot; runat=&amp;quot;server&amp;quot;/&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;asp:Button onClick=&amp;quot;DoTest&amp;quot; Text=&amp;quot;Add Post&amp;quot; Runat=&amp;quot;server&amp;quot; id=&amp;quot;Button1&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/asp:content&amp;gt;</description></item><item><title>IE6 and FF rendering</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1646&amp;key=s81rYxdtruSgqLChfCjeRQ%3d%3d&amp;post=5196</link><pubDate>Fri, 04 Nov 2005 09:58:50 GMT</pubDate><description>thanks paul...i actually just put clienttarget=&amp;quot;uplevel&amp;quot; in my page declaration and it rendered the way i wanted!  who knew?  now i'm using panels and i love them...it's easy to create xhtml validating code because you just add panels to panels, and then literals to the panels with your code inside.  really easy to modularize code with them, and they render as &amp;lt;div&amp;gt;'s.  basically my code creates a panel, adds the css class to it, adds the code string i've created and puts it in a literal i add to the panel and viola!</description></item><item><title>IE6 and FF rendering</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1646&amp;key=s81rYxdtruSgqLChfCjeRQ%3d%3d&amp;post=5165</link><pubDate>Mon, 31 Oct 2005 11:42:35 GMT</pubDate><description>It because ASP.NET produces crappy browser-dependent html -- good in a few cases, not so good in many others.  I avoid the panel for this reason -- just use a &amp;lt;div&amp;gt; with a runat=server if that's what you want -- then that's what you'll always get.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>IE6 and FF rendering</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1646&amp;key=s81rYxdtruSgqLChfCjeRQ%3d%3d&amp;post=5164</link><pubDate>Mon, 31 Oct 2005 05:44:52 GMT</pubDate><description>i've created my site in vs.net 2003. for one page, i have 1 panel, and based on the variables sent to it, i render the page accordingly, dynamically adding panels and literals as need be.  this works fine in IE6, as all the panels have an HTML output of &amp;lt;div&amp;gt;.  however, in firefox (and i assume all other &amp;quot;correct&amp;quot; browsers), the panels render as tables!  my stylesheet is based on divs, plus i want to stay in accordance to web standards and not use tables for layout.  why does it do this, and how do i remedy this?  am i just stuck making a new stylesheet?&lt;br /&gt;
&lt;br /&gt;
thanks</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5159</link><pubDate>Fri, 28 Oct 2005 14:14:21 GMT</pubDate><description>A &amp;lt;script runat=&amp;quot;server&amp;quot;&amp;gt; tag is a special case, so you can't do that.  Look at the Register*** methods in the Page class for working with client script.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5155</link><pubDate>Fri, 28 Oct 2005 11:12:37 GMT</pubDate><description>i am having a similar problem.  i have already employed the technique above for the CSS stylesheet, but now i wish to add a javascript file (.js).  i have tried using the exact same format:&lt;br /&gt;
&lt;br /&gt;
HTML:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;script id=&amp;quot;myscript&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&lt;br /&gt;
VB:&lt;br /&gt;
&lt;br /&gt;
Protected WithEvents myscript As System.Web.UI.HtmlControls.HtmlGenericControl &lt;br /&gt;
&lt;br /&gt;
myscript.Attributes(&amp;quot;src&amp;quot;) = ResolveUrl(&amp;quot;~/js/sf.js&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
and it keeps giving me an error that says &amp;quot;need an instance of the object&amp;quot;  what could i possibly be doing wrong if i copied the exact same format and made all the necessary substitutions?&lt;br /&gt;
&lt;br /&gt;
thanks</description></item><item><title>Extending a base class</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1623&amp;key=MJ3irmxhJNJTs92xgQksTw%3d%3d&amp;post=5073</link><pubDate>Sun, 23 Oct 2005 09:10:26 GMT</pubDate><description>Wrapping in a property did it, thanks much.</description></item><item><title>Extending a base class</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1623&amp;key=MJ3irmxhJNJTs92xgQksTw%3d%3d&amp;post=5072</link><pubDate>Sun, 23 Oct 2005 08:26:53 GMT</pubDate><description>Hi Mark:&lt;br /&gt;
&lt;br /&gt;
I can only make a guess looking at pseudocode, so if my guess is wrong you will really have to send the actual code.  My guess is that you aren't declaring your sysparm member as public, or better yet you aren't wrapping it in a public property.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Extending a base class</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1623&amp;key=MJ3irmxhJNJTs92xgQksTw%3d%3d&amp;post=5071</link><pubDate>Sun, 23 Oct 2005 07:15:17 GMT</pubDate><description>As to putting the methods in the base class, that has already been done.  But the class has a number of properties, and if this&lt;br /&gt;
works good I may do it with another class.  But in any case, at this point its become an issue of figuring out how.&lt;br /&gt;
&lt;br /&gt;
(at the bottom Ive pseudo coded what Im doing)&lt;br /&gt;
&lt;br /&gt;
When I initially said &amp;quot;I cant find that&amp;quot;, I meant that when I was at the .ascx file, the &amp;quot;sysparm&amp;quot; instance wasnt visible either in the debugger or intellisense.  This was just a &amp;quot;DUH&amp;quot; scoping problem.  I am scoping correctly, so that when Im in the .ascx control, I can see the&lt;br /&gt;
instance in the debugger under:&lt;br /&gt;
// &amp;quot;this&amp;quot; window looks something like this:&lt;br /&gt;
this &lt;br /&gt;
    WebBaseControl&lt;br /&gt;
        System.Web.UI.UserControl&lt;br /&gt;
        Page&lt;br /&gt;
	    MyCustomProperty&lt;br /&gt;
            sysparm&lt;br /&gt;
               Htmltitle=&amp;quot;My Sysparms&amp;quot;&lt;br /&gt;
							&lt;br /&gt;
Everything looks fine in the debugger, its as I expect, but I cant reference the &amp;quot;sysparm&amp;quot; instance in the codebehind, much less its &amp;quot;htmltitle&amp;quot; property.  &amp;quot;Page.MyCustomProperty&amp;quot; works fine.  But if I try something like &amp;quot;Page.sysparm&amp;quot; its not there in intellisense.&lt;br /&gt;
								&lt;br /&gt;
Hope all this makes some sense.&lt;br /&gt;
Thanks, Mark&lt;br /&gt;
&lt;br /&gt;
// custom class&lt;br /&gt;
public class SystemParameters&lt;br /&gt;
    public string HtmlTitle=&amp;quot;My Sysparms&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// base page&lt;br /&gt;
public class WebBasePage : System.Web.Page.UI&lt;br /&gt;
    string MyCustomProperty=&amp;quot;My Custom Property&amp;quot;&lt;br /&gt;
    // below is the new stuff to create the class instance&lt;br /&gt;
    SystemParameters sysparm; // class instance&lt;br /&gt;
    public WebBasePage // ctor instantiating SystemParameters &lt;br /&gt;
         sysparm = new SystemParameters&lt;br /&gt;
    // end of new stuff				 &lt;br /&gt;
public class WebBaseControl: System.Web.UI.UserControl&lt;br /&gt;
     public new WebBasePage Page&lt;br /&gt;
         get { return (WebBasePage)base.Page&lt;br /&gt;
&lt;br /&gt;
// header.ascx, which inherits WebBaseControl&lt;br /&gt;
     Page_Load&lt;br /&gt;
         string myprop=Page.MyCustomProperty WORKS&lt;br /&gt;
         string htmlTitle=Page.sysparms.HtmlTitle  DOESNT WORK</description></item><item><title>Extending a base class</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1623&amp;key=MJ3irmxhJNJTs92xgQksTw%3d%3d&amp;post=5069</link><pubDate>Sat, 22 Oct 2005 13:04:46 GMT</pubDate><description>It sounds like everything should work, but without seeing what you have I can't really say what's wrong.  By the way, are you using this custom class somewhere else also?  If not then maybe you should just make its methods part of the base page and get rid of the separate class.  That's not just to solve your problem as much as it might just be the simpler design.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Extending a base class</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1623&amp;key=MJ3irmxhJNJTs92xgQksTw%3d%3d&amp;post=5066</link><pubDate>Sat, 22 Oct 2005 09:46:41 GMT</pubDate><description>I have an app using the base page templates (based on your examples), everything is good. Until I decided to get tricky :-) ....&lt;br /&gt;
&lt;br /&gt;
The application makes use of a custom class (which contains parameters such as the title) in almost every control.  I decided to instantiate it within the constructor of the base class, thinking that by inheriting the base page I get the custom class too.  &lt;br /&gt;
&lt;br /&gt;
In the debugger everything seems to be happening, and in the correct order, but when I get to the control where I want to actually utilize the custom class, I cant find it!&lt;br /&gt;
Is this possible?&lt;br /&gt;
Thanks, Mark&lt;br /&gt;
&lt;br /&gt;
</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5055</link><pubDate>Fri, 21 Oct 2005 05:46:14 GMT</pubDate><description>oy!  my mistake!  i'm sorry for not being more diligent checking my own code.  however, thank you for pointing me in the right direction.  i forgot to change my &amp;quot;Inherits=Mysite.WHATEVER&amp;quot; back to the page name, as opposed to the section.  thank you for your help!</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5053</link><pubDate>Fri, 21 Oct 2005 03:03:08 GMT</pubDate><description>If you're using a base page class technique then it sounds like you don't have some page code-behinds inheriting from the template base page class.  But there are a lot of page template methods, even that I have published, so you really need to give me a lot more details, and your code that isn't working, if that doesn't help.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5051</link><pubDate>Thu, 20 Oct 2005 22:29:45 GMT</pubDate><description>once i translated it into VB and figured out how to put&lt;br /&gt;
&lt;br /&gt;
Protected WithEvents MyLink As System.Web.UI.HtmlControls.HtmlGenericControl&lt;br /&gt;
&lt;br /&gt;
at the top, this worked out fine.  however, now i have a really weird problem.  my index file (/index.aspx) receives the header and footer, no problem.  the index file for my &amp;quot;about&amp;quot; section (/about/index.aspx) also receives the header and footer just fine.  yet, none of my other index pages in directories will receive the header and/or footer.  the code in each page is exactly the same (right now, pre-content), except for obvious page specific stuff, like CodeBehind=&amp;quot;~/products/index.aspx.vb&amp;quot; for the products page.  i have not the faintest idea why certain pages would get the header and footer and why some would not.  any ideas?&lt;br /&gt;
&lt;br /&gt;
thanks</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5003</link><pubDate>Wed, 19 Oct 2005 17:25:40 GMT</pubDate><description>There are several ways to do it.  One way would be to add a unique id and runat=server to the link tag, then you can refer to it in code-behind as an HtmlGenericControl, and then you can then use the Attributes collection to get the href and use ResolveUrl:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;link id=&amp;quot;MyLink&amp;quot; rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;&amp;lt;/link&amp;gt;&lt;br /&gt;
&lt;br /&gt;
HtmlGenericControl MyLink;&lt;br /&gt;
&lt;br /&gt;
MyLink.Attributes[&amp;quot;href&amp;quot;] = ResolveUrl(&amp;quot;~/css/styles.css&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
I may not have that exactly right, since that's off the top of my head, but it should be close.  Another solution is to put a literal control in place of the link tag, and then write out the entire link html in code as the text of the literal -- still using ResolveUrl of course.  There are other techniques also if you do some searching, and I actually parse and change the html that my page renders since I have user configurable stylesheets.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=5002</link><pubDate>Wed, 19 Oct 2005 15:57:39 GMT</pubDate><description>thanks for your help.  it's working, somewhat.  but like you mentioned, the CSS stylesheet won't link up.  i can't figure out how to do this because there's no object for the CSS stylesheet, i don't think.  how do i get it to do&lt;br /&gt;
&lt;br /&gt;
&amp;lt;link rel='stylesheet' type='text/css'  href=&amp;quot;~/css/styles.css&amp;quot; /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
in the head tag?&lt;br /&gt;
&lt;br /&gt;
thanks a lot!</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=4986</link><pubDate>Wed, 19 Oct 2005 05:02:56 GMT</pubDate><description>You should always use app-relative paths using the ~ syntax.  So something like LoadControl(&amp;quot;~/Templates/MyControl.ascx&amp;quot;) should work fine.  Similarly you will need to make sure any paths in your user control are app-relative (or resolved to be at runtime anyhow) since it will be used from other folders.  That means images and hyperlinks should use the ~ syntax -- and you'll need a runat=server to make that work.  And sometimes you'll have no choice but to use ResolveUrl in code -- for instance the stylesheet link tag doesn't resolve app-relative paths automatically.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>User Controls for many dirs</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1605&amp;key=hUM1JorxPbRhheufy1yt7Q%3d%3d&amp;post=4985</link><pubDate>Tue, 18 Oct 2005 22:02:13 GMT</pubDate><description>I have my user controls in a folder called &amp;quot;Templates.&amp;quot; My other files are sorted into directories, like /products/ or /about/, where an index.aspx file resides.  I'm having problems with your model in trying to pull the user control from the /templates/ dir from a file that is not at the same level, ie, the root index.aspx file.  I hope this is clear!  Thanks for your help.</description></item><item><title>Namespace..?</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1579&amp;key=NNyQG3%2fITTT57zUhdmDZ7Q%3d%3d&amp;post=4984</link><pubDate>Tue, 18 Oct 2005 21:59:11 GMT</pubDate><description>That was it!  I didn't upload the bin folder.  When I uploaded that, everything pretty much worked.</description></item><item><title>Namespace..?</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1579&amp;key=NNyQG3%2fITTT57zUhdmDZ7Q%3d%3d&amp;post=4979</link><pubDate>Tue, 18 Oct 2005 20:00:17 GMT</pubDate><description>Hi Jason:&lt;br /&gt;
&lt;br /&gt;
I think you're missing the point that this doesn't appear to have anything to do with page templates.  The type that your error message is saying is not able to be loaded is your own code-behind type.  That typically means either it is not compiled, or it is not deployed in the bin directory, or the application folder is not an IIS application (that isn't a problem if you are deploying to a web root though), or the server is setup incorrectly (or intentionally does not support the bin directory).  There may be something else I'm leaving out, and it may be obvious if I was there seeing everything you have and are doing, but if its not something obvious and it works locally but not on the web host then you really need to ask your web host why your web app cannot load your code-behind type.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Namespace..?</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1579&amp;key=NNyQG3%2fITTT57zUhdmDZ7Q%3d%3d&amp;post=4975</link><pubDate>Tue, 18 Oct 2005 18:44:55 GMT</pubDate><description>Thanks for responding.  What do I need to ask them to do?  Remember I'm really new at this and have no idea why it doesn't simply just work like it should.  I went into my control panel and turned on &amp;quot;parent paths,&amp;quot; if that means anything, and tried it again and still didn't get it to work.&lt;br /&gt;
&lt;br /&gt;
Also, is there any way that you can use this method to insert another user control, like a dynamically generated sub-navigation control?  Or does that have to be manually inserted where it belongs?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;br /&gt;
Jason&lt;br /&gt;
(xj22x at hotmail dot com)</description></item><item><title>Namespace..?</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1579&amp;key=NNyQG3%2fITTT57zUhdmDZ7Q%3d%3d&amp;post=4962</link><pubDate>Tue, 18 Oct 2005 05:06:48 GMT</pubDate><description>You really need to get your hosting company to help you since its going to be something they control -- for instance I know Brinkster's free account used to not allow you to have a bin directory (although that may since have changed).&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Namespace..?</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1579&amp;key=NNyQG3%2fITTT57zUhdmDZ7Q%3d%3d&amp;post=4956</link><pubDate>Mon, 17 Oct 2005 21:25:43 GMT</pubDate><description>Paul-&lt;br /&gt;
&lt;br /&gt;
I just deleted my whole solution and redid it from scratch (not my original code, just the solution I created from your template :).  After building, it shows up fine in the VS.NET browser and fine when I copy the local server address and plug it into IE6 or FF, but when I upload it to my hosting server, I still get an error.  Now I am getting the &amp;quot;Could not load type 'columbussupply.Global'.&amp;quot; error, and if I delete all the Global files, I get the original error. I'm not using subdomains.  (edit this out if you'd like) See for yourself: http://www.columbussupply.com/index.aspx&lt;br /&gt;
&lt;br /&gt;
What am I doing wrong?</description></item><item><title>Namespace..?</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1579&amp;key=NNyQG3%2fITTT57zUhdmDZ7Q%3d%3d&amp;post=4926</link><pubDate>Sun, 16 Oct 2005 09:12:49 GMT</pubDate><description>Hi Jason:&lt;br /&gt;
&lt;br /&gt;
Have you compiled your web project, which would include your code-behind?&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item><item><title>Namespace..?</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1579&amp;key=NNyQG3%2fITTT57zUhdmDZ7Q%3d%3d&amp;post=4910</link><pubDate>Thu, 13 Oct 2005 09:22:56 GMT</pubDate><description>Hi, I'm new to asp.net and i've tried to implement your page template generated from your site.  i guess i don't really understand namespaces yet, because whenever i try to load my page, i get the following error:&lt;br /&gt;
&lt;br /&gt;
Parser Error Message: could not load type 'columbussupply.index'&lt;br /&gt;
&lt;br /&gt;
and the line generating that error is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;%@ Page Language=&amp;quot;VB&amp;quot; Codebehind=&amp;quot;index.aspx.vb&amp;quot; AutoEventWireup=&amp;quot;false&amp;quot; Inherits=&amp;quot;columbussupply.index&amp;quot; %&amp;gt;&lt;br /&gt;
&lt;br /&gt;
every time i go through all those pages and try to change the &amp;quot;YourNameSpace&amp;quot; to something else, i keep getting the same error.  i guess i'm missing a key concept or something.  what am i doing wrong?&lt;br /&gt;
&lt;br /&gt;
thanks,&lt;br /&gt;
Jason</description></item><item><title>Question on implementation</title><link>http://www.microsoftarchitect.com/Forums/Default.aspx?part=42&amp;action=thread&amp;id=1546&amp;key=qBtTUxLheZ8Fotxb8g0pkw%3d%3d&amp;post=4784</link><pubDate>Thu, 29 Sep 2005 12:22:16 GMT</pubDate><description>I believe the whole point, if I recall correctly, was to get rid of the naming container that would occur if you did not do what I did.  In other words, I wanted my controls to be named MyControl instead of UserControl_MyControl.  It was slightly (but barely) faster to get rid of the naming container, and things just look better when you're looking at your html and writing javascript -- it also renders a little smaller.  Note that .NET v2.0 MasterPages does not do this, and while I understand why (my version can have a problem if you have a control with the same name in the master and page) I'm not very fond of the html that results.  By the way, doing it my way required adding the empty template at the end to make the events in the master continue to be processed.&lt;br /&gt;
&lt;br /&gt;
Thanks, Paul Wilson</description></item></channel></rss>