Commit Graph
91 Commits
Author SHA1 Message Date
Marek Habersack de3974edad 2007-08-14 Marek Habersack <[email protected]>
* SessionStateServerHandler.cs: remove unused field.

2007-08-14  Marek Habersack  <[email protected]>

	* Control.cs: include the actual exception when reporting control
	id clash.

2007-08-14  Marek Habersack  <[email protected]>

	* Roles.cs: remove unused field.

	* SqlMembershipProvider.cs: remove unused variable.

2007-08-14  Marek Habersack  <[email protected]>

	* ObjectDataSourceView.cs: remove unused variable.

	* ChangePassword.cs: remove unused variable.

	* RoleGroupCollection.cs: OnValidate shouldn't be overridden.

2007-08-14  Marek Habersack  <[email protected]>

	* SqlProfileProvider.cs: remove unused variable.

2007-08-14  Marek Habersack  <[email protected]>

	* XmlSiteMapProvider.cs: do not hide this_lock.



svn path=/trunk/mcs/; revision=84041
2007-08-14 10:52:59 +00:00
Marek Habersack 6a629d62d7 2007-07-18 Marek Habersack <[email protected]>
* ControlBuilder.cs: on the 2.0 profile BindingContainerType
	returns the associated control's base type when parent builder is
	absent instead of typeof (Control). It returns typeof (Control) if
	the parent builder type is determined to be a
	NamingContainer. This makes the generated code match the MS.NET
	output. Fixes bug #82119.

2007-07-18  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: on the 2.0 profile, GetContainerType
	does not look up the Item/Items properties to determine the
	container type, instead it just returns the type reported by the
	builder passed to this method. This change makes the generated
	code match MS.NET. Fixes bug #82119.


svn path=/trunk/mcs/; revision=82200
2007-07-18 12:48:55 +00:00
Marek Habersack d820431bb9 2007-07-02 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: don't use StartWith to see if a
	variable's value is a bind expression, as it erroneously renames
	all calls to methods starting with the string Bind. Use a regular
	expression now instead. Fixes bug #81928.

svn path=/trunk/mcs/; revision=81172
2007-07-02 11:40:40 +00:00
Marek Habersack 33ca50cc32 2007-06-13 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: make sure control has a writable
	TemplateControl property prior to assigning values to it.

svn path=/trunk/mcs/; revision=79348
2007-06-12 22:26:08 +00:00
Marek Habersack 1fcd4ba60d 2007-06-09 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: TemplateControl is assigned for
	controls that are placed within ContentPlaceHolder and not for the
	ContentPlaceHolder itself.
	No longer add the overriden version of TemplateSourceDirectory to
	the generated source, all the work is now done in
	Control.TemplateSourceDirectory.

	* BaseCompiler.cs: AppRelativeVirtualPath shouldn't end with a
	slash, for compatibility with MS.NET

2007-06-09  Marek Habersack  <[email protected]>

	* TemplateControl.cs: make sure TemplateControl is set to the
	current control.

	* Control.cs: TemplateControl property goes up the parent chain if
	the property isn't defined in the current control.
	TemplateSourceDir finally implemented correctly.

2007-06-09  Marek Habersack  <[email protected]>

	* ControlTest.cs: enabled two tests that hadn't been working
	before.


svn path=/trunk/mcs/; revision=79021
2007-06-08 23:51:23 +00:00
Marek Habersack bf0152c8c5 2007-06-05 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: TemplateSourceDirectory in the 2.0
	profile uses the TemplateControl property instead of Parent. This
	allows to return the correct path.

2007-06-05  Marek Habersack  <[email protected]>

	* Control.cs: TemplateSourceDirectory uses TemplateControl to
	lookup the virtual source directory in the 2.0 instead of the
	Parent.
	ResolveClientUrl copes with empty TemplateSourceDirectory in the
	correct way now - the check is made after the basePath checks.
	The changes above make ResolveClientUrl work properly when called
	from within a control residing in a TemplateControl.


svn path=/trunk/mcs/; revision=78624
2007-06-05 12:50:12 +00:00
Marek Habersack 2179056c0d 2007-06-01 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: be case-insensitive when looking for
	Bind requests.


svn path=/trunk/mcs/; revision=78408
2007-06-01 14:10:46 +00:00
Rolf Bjarne Kvinge c1af7a324d 2007-05-25 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: Changed a few incorrect 
	ObjectCreationExpression to the correct DelegateCreationExpression.
	Fixes #81706.


svn path=/trunk/mcs/; revision=77950
2007-05-25 16:32:58 +00:00
Marek Habersack 02657c3d11 2007-05-15 Marek Habersack <[email protected]>
* ResourceExpressionBuilder.cs: added a static method to generate
	a GetLocalResourceObject call which properly handles types which
	cannot be converted from strings.

	* TemplateControlCompiler.cs: use code described above to generate
	code for properties assigned from resources.


svn path=/trunk/mcs/; revision=77437
2007-05-15 20:48:57 +00:00
Marek Habersack d468a76803 2007-05-08 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: BuildTemplateMethod is a delegate,
	so use a delegate create expression - it may make difference for
	languages other than C# (e.g. VisualBasic).

svn path=/trunk/mcs/; revision=76923
2007-05-08 12:50:59 +00:00
Marek Habersack 4924c989df forgotten ifdefs
svn path=/trunk/mcs/; revision=76676
2007-05-04 12:51:41 +00:00
Marek Habersack 279d12b449 Another in the series of compatibility fixes discovered thanks to the QuickStarts... :)
2007-05-04  Marek Habersack  <[email protected]>

	* HtmlAnchor.cs: use ResolveClientUrl when generating
	attributes. Necessary if the control is in a master page which is
	in a different directory than the current page.

2007-05-04  Marek Habersack  <[email protected]>

	* AdRotator.cs: use the new GetPhysicalFilePath method to look up
	the physical path of the ad file.

2007-05-04  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: do not query the parent for
	TemplateSourceDirectory if we are generating code for a Master
	Page.

2007-05-04  Marek Habersack  <[email protected]>

	* Control.cs: added an internal method to resolve a physical path
	to a file from its virtual path considering the possibility that a
	control is placed in a master page, which in turn is referenced
	from a directory another than that of master page itself.


svn path=/trunk/mcs/; revision=76665
2007-05-04 10:58:11 +00:00
Marek Habersack 55b55a615b 2007-04-30 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: fix generation of code for
        declarative attribute assignments of the form Font-Size="small"
        (i.e. when a font size is assigned a symbolic, relative size
        value). This fixes for example rendering of the 0th level of
        TreeView controls.


svn path=/trunk/mcs/; revision=76472
2007-04-30 06:44:10 +00:00
Marek Habersack 5d089556fe 2007-03-26 Marek Habersack <[email protected]>
Use GetExpressionFromString to generate a correct expression for
	custom page/control attributes. Fixes bug #81132.

svn path=/trunk/mcs/; revision=74980
2007-03-26 13:47:27 +00:00
Marek Habersack 94e8fa3fd1 2007-03-26 Marek Habersack <[email protected]>
Process meta:resourcekey after all the field/attribute assignments
	are done. Fixes bug #80809.
	Clean the code up a bit.


svn path=/trunk/mcs/; revision=74973
2007-03-26 11:56:44 +00:00
Marek Habersack 48885962c7 2007-03-26 Marek Habersack <[email protected]>
* TemplateParser.cs: support the meta:resourcekey attribute in
	Page and Control directives. Fixes bug #81204.

2007-03-26  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: refactor assining properties from
	resources a bit to support pages and user controls. Fixes bug
	#81204.

svn path=/trunk/mcs/; revision=74972
2007-03-26 11:42:01 +00:00
Marek Habersack 4b8b453f42 2007-03-21 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: added support for setting custom
	attributes of a base class from the Page or Control directive
	attributes.

2007-03-21  Marek Habersack  <[email protected]>

	* UnknownAttributeDescriptor.cs: an internal helper class for
	custom directive attributes support.

	* BaseParser.cs: ThrowParseException can now take variadic
	parameters, for convenience.

	* TemplateParser.cs: add support for custom attributes for the
	Page and Control directives.

2007-03-21  Marek Habersack  <[email protected]>

	* System.Web.dll.sources: added UnknownAttributeDescriptor.cs


svn path=/trunk/mcs/; revision=74734
2007-03-21 14:09:18 +00:00
Marek Habersack 6b5f777e63 it should have come with the previous commit
svn path=/trunk/mcs/; revision=74240
2007-03-14 08:52:56 +00:00
Marek Habersack 86823f9836 * PageThemeCompiler.cs: let property builders through, stop the
builders that have no control type. Fixes bug #81092

	* TemplateControlCompiler.cs:
	Make sure builders are in valid state before trying to use them.

svn path=/trunk/mcs/; revision=74171
2007-03-13 14:31:46 +00:00
Marek Habersack fba0cc826e 2007-03-13 Marek Habersack <[email protected]>
* TemplateParser.cs: name generated classes the same way MS.NET
	does - include the app-relative path to the control/page in the
	class name.
	* PageCompiler.cs: interfaces are to be implemented by the parent
	partial class, not the generated one.
	* TemplateControlCompiler.cs:
	Put field declarations for controls in the partial class.
	* BaseCompiler.cs:
	Change the generated code model for pages/controls to comply with
	the way MS.NET does (partial class contains only two properties
	plus declarations of all the controls, the actual control/page
	class inherits from the partial class). Fixes bug #81001.


svn path=/trunk/mcs/; revision=74167
2007-03-13 13:11:04 +00:00
Marek Habersack 095b2a7004 2007-03-13 Marek Habersack <[email protected]>
* AppResourceFilesCollection.cs: added separate constructor for
        local resources handling.

        * TemplateControlCompiler.cs: request the local resource object
        with proper virtual path.

        * BaseCompiler.cs: added code to assing AppRelativeVirtualPath
        property in the page/control constructor.

        * AppResourcesCompiler.cs: does not require specifying manually
        whether it's a global or local resource compiler anymore. New
        constructors take care of that.
        Changed to compile local resources on demand, when a control/page
        is parsed.

2007-03-13  Marek Habersack  <[email protected]>

        * AppResourceFilesCollection.cs: added separate constructor for
        local resources handling.

        * TemplateControlCompiler.cs: request the local resource object
        with proper virtual path.

        * BaseCompiler.cs: added code to assing AppRelativeVirtualPath
        property in the page/control constructor.

        * AppResourcesCompiler.cs: does not require specifying manually
        whether it's a global or local resource compiler anymore. New
        constructors take care of that.
        Changed to compile local resources on demand, when a control/page
        is parsed.

2007-03-13  Marek Habersack  <[email protected]>

        * TemplateControl.cs: implement AppRelativeVirtualPath. Closes bug
        #80634.


svn path=/trunk/mcs/; revision=74159
2007-03-13 09:56:36 +00:00
Marek Habersack f7193c8afe Implement connection string expressions
svn path=/trunk/mcs/; revision=73460
2007-02-27 12:51:36 +00:00
Marek Habersack 6ad6d72642 Fix culture problems of the control compiler System.Web.Compilation/ChangeLog System.Web.Compilation/TemplateControlCompiler.cs
svn path=/trunk/mcs/; revision=73015
2007-02-16 14:23:07 +00:00
Marek Habersack 54d4c62e44 Fix the FontUnit cultural issue
svn path=/trunk/mcs/; revision=72977
2007-02-16 01:56:20 +00:00
Marek Habersack 4be3a51818 Fix TemplateSourceDirectory.
svn path=/trunk/mcs/; revision=72476
2007-02-08 13:27:15 +00:00
Miguel de Icaza 6b4c7232fd * SiteMapNode.cs (GetExplicitResourceString): implement.
* HttpContext.cs (GetGlobalResourceObject): remove unused variable.

        * StaticFileHandler.cs (ProcessRequest): remove unused variable.

        * HttpApplication.cs (ProcessError): Remove unused variable.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ClientBuildManager.cs: Remove unused variable (this could be a
        real problem, we never use the appPhysicalTargetDir)

        * AssemblyBuilder.cs: Remove unused field.

        * AppResourceFilesCollection.cs: Remove unused field.

        * TemplateControlCompiler.cs (GetExpressionFromString): Remove
        unused variable.

        * AppResourcesCompiler.cs: Remove unused variable.

        * AppSettingsExpressionBuilder.cs (GetAppSetting): remove unused
        parameter.

        * PageCompiler.cs: Put InternalCreatePageProperty inside the
        NET_2_0 block to eliminate warnings.

2007-01-20  Miguel de Icaza  <[email protected]>

        * HandlerFactoryConfiguration.cs (LoadType): remove unused
        variable.
        (ctor): do not assign parent, we do not use it, keep the code for
        reference.

2007-01-20  Miguel de Icaza  <[email protected]>

        * ApplicationManager.cs: Remove unused variable.
        (ShutdownAll) remove unused variables.

        * ApplicationHost.cs: Protect create_dir lock

2007-01-20  Miguel de Icaza  <[email protected]>

        * SqlRoleProvider.cs: comment out unused code.

        * SqlMembershipProvider.cs: Removed unused variables.
        Remove unused variable.

        * AnonymousIdentificationModule.cs (ClearAnonymousIdentifier):
        remove unused variable.   This might be a real bug.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionStateModule.cs: Removed unused variables.

2007-01-20  Miguel de Icaza  <[email protected]>

        * SessionDictionary.cs: Removed unused variable (dirty).

2007-01-20  Miguel de Icaza  <[email protected]>

        * XhtmlTextWriter.cs: comment out unused code.

        * ThemeProvider.cs: comment out unused code.

        * DataSourceView.cs: Comment unused variable.

        * ClientScriptManager.cs: Put the expandoAttributes inside the 2.0
        code

        * Control.cs: Put _templateControl inside the NET_2_0 ifdef

2007-01-20  Miguel de Icaza  <[email protected]>

        * HtmlHead.cs: comment out unused code, in particular metadata is
        commented out because nothing could have triggered its creation.

        * HtmlButton.cs: Move declaration of `csm' inside the 1.1 case.

2007-01-20  Miguel de Icaza  <[email protected]>

        * DataControlFieldCollection.cs (RemoveAt): remove unused
        variable.

        * RoleGroupCollection.cs (OnValidate): Flag as protected, as it
        should not show up.

        * RadioButton.cs (RaisePostDataChangedEvent): This method was not
        used in 1.0, so put the whole method in 2.0

2007-01-20  Miguel de Icaza  <[email protected]>

        * WebPart.cs: Remove

        * PersonalizableAttribute.cs: Remove extra API that was wrong as well.

2006-11-28  Miguel de Icaza  <[email protected]>

        * WebPart.cs:

2007-01-20  Miguel de Icaza  <[email protected]>

        * FileUtils.cs (CreateTemporaryFile): Remove unused variable.



svn path=/trunk/mcs/; revision=71399
2007-01-20 22:42:04 +00:00
Marek Habersack f289544bd1 Mark AutoHelpers as obsolete in generated code and a fix for bug #77069
svn path=/trunk/mcs/; revision=71376
2007-01-20 01:57:56 +00:00
Marek Habersack 87896660c4 Forgotten commit
svn path=/trunk/mcs/; revision=71028
2007-01-15 13:51:55 +00:00
Igor Zelmanovich 368eb80064 2006-11-19 Igor Zelmanovich <[email protected]>
* TemplateControlCompiler.cs: fixed:
	When <%# Bind(...) %>-expression is used more then once for same control
	The variable associated with this control is declared only once.


svn path=/trunk/mcs/; revision=68150
2006-11-19 14:05:18 +00:00
Marek Habersack 58fca48c17 Add support for App_GlobalResources and App_LocalResources
svn path=/trunk/mcs/; revision=66799
2006-10-18 20:30:10 +00:00
Igor Zelmanovich 2b394a35ea 2006-10-03 Igor Zelmanovich <[email protected]>
* TemplateControlCompiler.cs: fixed: Bind functions (Data-Binding Syntax).
	At run time, the Bind method calls the Eval method, if there is DataItem
	!= null to bind to.
	If there is DataItem == null (like InsertItemTemplate in FormView) Bind
	method don't raise exception and works properly to extract data from
	bounded controls on postback.
		

svn path=/trunk/mcs/; revision=66192
2006-10-03 14:12:38 +00:00
Gonzalo Paniagua Javier 828f21b0ff 2006-07-28 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: support assigning nullable types.
	Patch by Marek Habersack that fixes bug #78970.


svn path=/trunk/mcs/; revision=63094
2006-07-28 18:50:22 +00:00
Gonzalo Paniagua Javier 155d66b68a 2006-07-13 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: make password work again.


svn path=/trunk/mcs/; revision=62584
2006-07-13 21:44:46 +00:00
Andrew Skiba a61790c0cd take care of UrlPropertyAttribute
svn path=/trunk/mcs/; revision=61875
2006-06-20 14:11:42 +00:00
Andrew Skiba 1d80fed29a Check IsWritablePropertyOrField before generating code for assignment statement and DataBind event.
svn path=/trunk/mcs/; revision=61826
2006-06-18 10:51:24 +00:00
Lluis Sanchez 0f8b236ef8 2006-04-12 Lluis Sanchez Gual <[email protected]>
* TemplateControlCompiler.cs: Properly read all content of
	string properties.


svn path=/trunk/mcs/; revision=59382
2006-04-11 22:05:23 +00:00
Andrew Skiba 99d20dcc77 fix for partial parsers
svn path=/trunk/mcs/; revision=59363
2006-04-11 15:21:58 +00:00
Miguel de Icaza cfe5abfc83 2006-04-08 Miguel de Icaza <[email protected]>
* TemplateControlCompiler.cs: An attempt to fix the regression
	introduced in r58505 (a bug fix for 77762).   This was reported in
	the mailing list with a batch of new 2.0 failures.

	We really need a test suite in NUnit to check on ASP.NET aspx

svn path=/trunk/mcs/; revision=59249
2006-04-08 18:39:54 +00:00
Gonzalo Paniagua Javier 915d986f09 2006-03-24 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/ControlBuilder.cs: when creating a default property
	builder, handle strings specially.

	* System.Web.UI/StringPropertyBuilder.cs: new builder used in
	TextBox 2.0.
	* System.Web.dll.sources: add StringPropertyBuilder.
	* System.Web.Compilation/TemplateControlCompiler.cs: handle the new
	StringPropertyBuilder.

	Fixes bug #77762.


svn path=/trunk/mcs/; revision=58505
2006-03-24 23:11:09 +00:00
Chris Toshok e40c1de28e 2006-03-13 Chris Toshok <[email protected]>
* TemplateControlCompiler.cs (InitMethod): when generating the
	call to ApplyStyleSheetSkin, don't just blindly pass "this" as the
	argument to it.  Only do that if the class we're compiling is
	actually a subclass of Page.  If it's not, pass this.Page.


svn path=/trunk/mcs/; revision=57910
2006-03-13 21:29:02 +00:00
Chris Toshok a41dc6da6b 2006-03-07 Chris Toshok <[email protected]>
* AspGenerator.cs: refactor the parsing code so that we can
	initiate parsing from outside this class.

	* PageCompiler.cs (PrependStatementsToFrameworkInitialize): new
	method, add our StyleSheetTheme assignment here.
	(AppendStatementsToFrameworkInitialize): rename AddStatements* to
	this.

	* TemplateControlCompiler.cs (EnsureID): make protected.
	(CreateAssignStatementsFromAttributes): same
	(AddChildCall): same.
	(CreateControlTree): same.
	(CreateFrameworkInitializeMethod): change
	"AddStatementsToFrameworkInitialize" to
	"AppendStatementsToFrameworkInitialize", and add call to
	"PrependStatementsToFrameworkInitialize" before the generation of
	"base.FrameworkInitialize()."

	* PageThemeCompiler.cs (CreateControlSkinMethod): remove spew.


svn path=/trunk/mcs/; revision=57674
2006-03-07 22:27:51 +00:00
Chris Toshok 9cd26e2c03 In System.Web.UI:
2006-03-02  Chris Toshok  <[email protected]>

	* Control.cs (ApplyStyleSheetTheme): remove the exception, and add
	a MonoTODO.

	* Page.cs (Theme): implement setter/getter.
	(StyleSheetTheme): same.
	
	* PageParser.cs (ProcessMainAttributes): parse the Theme and
	StyleSheetTheme attributes.

In System.Web.UI.WebControls:
2006-03-02  Chris Toshok  <[email protected]>

	* WebControl.cs (SkinID): implement setter/getter, and have them
	just chain up to base.SkinID.

In System.Web.Compilation:
2006-03-02  Chris Toshok  <[email protected]>

	* TemplateControlCompiler.cs (InitMethod): emit an assignment for
	SkinID just after the creation of our object, and right after that
	call "_ctrl.ApplyStyleSheetSkin (page)".
	(CreateAssignStatementsFromAttributes): split out the majority of
	this code to CreateAssignStatementFromAttribute, and change this
	method to simply a loop over the attribute keys.  In the 2.0 case,
	skip the SkinID property, since that's handled explicitly in
	InitMethod.

	* PageCompiler.cs (AddStatementsToInitMethod): emit assignments
	for Theme and StyleSheetTheme.


svn path=/trunk/mcs/; revision=57516
2006-03-02 19:30:08 +00:00
Chris Toshok a381748f0b oops
svn path=/trunk/mcs/; revision=57223
2006-02-23 23:19:16 +00:00
Chris Toshok 553bc8d055 In System.Web.Compilation:
2006-02-23  Chris Toshok  <[email protected]>

	* TemplateControlCompiler.cs (AddContentTemplateInvocation): track
	change from ContentControlBuilderInternal to
	ContentBuilderInternal.
	(AddCodeRender): same.

In System.Web.UI.WebControls:
	* CheckBox.cs, ContentControlBuilderInternal.cs, Content.cs,
	ContentPlaceHolderBuilder.cs, ContentPlaceHolder.cs,
	DataControlFieldHeaderCell.cs, DataGridColumn.cs,
	HierarchicalDataBoundControl.cs, HyperLinkField.cs,
	ImageButton.cs, ImageField.cs, Literal.cs,
	ObjectDataSourceView.cs, TextBox.cs: more corcompare work.


svn path=/trunk/mcs/; revision=57221
2006-02-23 23:04:09 +00:00
Gonzalo Paniagua Javier f269a83e07 2006-02-14 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/WebHandlerParser.cs:
	* System.Web.UI/WebServiceParser.cs:
	* System.Web.UI/UserControlParser.cs:
	* System.Web.UI/PageParser.cs: added new ctor that uses a TextReader
	as input.

	* System.Web.UI/TemplateControlParser.cs: new Reader property.
	* System.Web.UI/SimpleWebHandlerParser.cs: new Reader property and
	ctor.

	* System.Web.dll.sources: added new files.

	* System.Web.Compilation/GlobalAsaxCompiler.cs:
	* System.Web.Compilation/PageCompiler.cs:
	* System.Web.Compilation/TemplateControlCompiler.cs: CreateMethods is
	now internal.

	* System.Web.Compilation/WebServiceBuildProvider.cs:
	* System.Web.Compilation/PageBuildProvider.cs:
	* System.Web.Compilation/UserControlBuildProvider.cs:
	* System.Web.Compilation/WebHandlerBuildProvider.cs: new build
	providers.

	* System.Web.Compilation/BuildProvider.cs: add assemblies.

	* System.Web.Compilation/BaseCompiler.cs: expose the provider and the
	compile unit through properties.

svn path=/trunk/mcs/; revision=56878
2006-02-14 22:02:15 +00:00
Chris Toshok 09e8f2a763 2006-02-07 Chris Toshok <[email protected]>
* TemplateControlCompiler.cs (AddParsedSubObjectStmt): append the
	calls to AddParsedSubObject to a special statement collection --
	builder.flushOutputStatements -- not to builder.method.Statements.
	(InitMethod): initially, set flushOutputStatements to
	method.Statements.  If we're dealing with a ContentPlaceHolder,
	set flushOutputStatements to be the else block of a conditional we
	create.  This causes the compiled control to fall back to the
	ContentPlaceHolder's child controls in case there's no
	corresponding Content template.
	(AddChildCall): use methodStatements instead of method.Statements.
	(CreateControlTree): same.

	* PageCompiler.cs (CreatePropertyAssign): factor out the
	string,string implementation and add one that also takes a
	CodeExpression; make the string,string implementation call the
	three arg one with thisRef.
	(AddStatementsToInitMethod): make use of the 3-arg form of
	CreatePropertyAssign to reduce code.  Also, add support for
	setting the page's Title from the parser's Title.


svn path=/trunk/mcs/; revision=56639
2006-02-07 20:42:35 +00:00
Chris Toshok 800a78cd46 2006-02-07 Chris Toshok <[email protected]>
* TemplateControlCompiler.cs (AddParsedSubObjectStmt): append the
	calls to AddParsedSubObject to a special statement collection --
	builder.flushOutputStatements -- not to builder.method.Statements.
	(InitMethod): initially, set flushOutputStatements to
	method.Statements.  If we're dealing with a ContentPlaceHolder,
	set flushOutputStatements to be the else block of a conditional we
	create.  This causes the compiled control to fall back to the
	ContentPlaceHolder's child controls in case there's no
	corresponding Content template.

	* PageCompiler.cs (CreatePropertyAssign): factor out the
	string,string implementation and add one that also takes a
	CodeExpression; make the string,string implementation call the
	three arg one with thisRef.
	(AddStatementsToInitMethod): make use of the 3-arg form of
	CreatePropertyAssign to reduce code.  Also, add support for
	setting the page's Title from the parser's Title.


svn path=/trunk/mcs/; revision=56635
2006-02-07 20:10:07 +00:00
Chris Toshok e210711eea 2006-02-07 Chris Toshok <[email protected]>
* UserControlCompiler.cs (AddStatementsToInitMethod): emit code to
	assign __ctrl.MasterPageFile to our master page, if we have one.

	* PageCompiler.cs (CreateContructor): remove the MasterPageFile
	assignment from here.
	(AddStatementsToInitMethod): and move it here.
	
	* TemplateControlCompiler.cs (InitMethod): in the case where
	builder is a RootBuilder (we're building the __BuildControlTree
	method), call a virtual method so that subclasses can add their
	own statements to the method (used by both Page and MasterPage);
	Also, in the RootBuilder case, the argument should be the
	parser.ClassName type (the class we're building); lastly, expand
	the ContentPlaceHolder logic to include all the
	ContentTemplates/InstantiateIn magic.
	(AddStatementsToInitMethod): empty virtual method.
	(AddContentTemplateInvocation): ContentControlBuilder ->
	ContentControlBuilderInternal.
	(CreateControlTree): same.
	(CallBaseFrameworkInitialize): new function, create call to
	base.FrameworkInitialize.
	(CreateFrameworkInitializeMethod): call CallBaseFrameworkIniitialize.


svn path=/trunk/mcs/; revision=56619
2006-02-07 16:48:02 +00:00
Gonzalo Paniagua Javier cc5d84d39d Patch by D. Moonfire that fixes several issues with 2.0 page attributes.
svn path=/trunk/mcs/; revision=54363
2005-12-14 15:49:16 +00:00
Gonzalo Paniagua Javier 9eea35e3ab 2005-12-01 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: treat LightGrey as a synonym of LightGray.
	Fixes bug #76677.


svn path=/trunk/mcs/; revision=53803
2005-12-01 22:38:38 +00:00