* 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
* 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
* 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
* 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
* 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-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
* 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
* 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
* 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
* 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
* TemplateControlCompiler.cs: comparison between member name and the
first part of the id provided by the user should also be
case-insensitive. Fixes bug #75379.
svn path=/trunk/mcs/; revision=46511
* TemplateControlCompiler.cs: when mapping an attribute name to a field
or property name, there's no need to try with every property and field,
but just the one found when searching by name (no case). There was one
call to ProcessPropertiesAndFields per property or field until found,
now only one if the property/field is found, none otherwise.
svn path=/trunk/mcs/; revision=45808
* TemplateControlCompiler.cs: allow more than 2 levels when looking for
properties of fields for an attribute like "Prop1-Prop2-Prop3". Fixes
bug #75234.
svn path=/trunk/mcs/; revision=45807
* System.Web.UI/Page.cs: added AddContentTemplate method.
* System.Web.Compilation/TemplateControlCompiler.cs: use the Page
AddContentTemplate method, as the one in Master is protected. Fixes
bug #75157.
svn path=/trunk/mcs/; revision=45418
* TemplateControlCompiler.cs: Use the new BindingContainerType
property to find the type of the binding container.
svn path=/trunk/mcs/; revision=42998
* TemplateControlCompiler.cs: Avoid using the GetConverter() trick
for primitive types. Parse an empty color string as Color.Empty.
Get the converter for a property using its PropertyDescriptor.
svn path=/trunk/mcs/; revision=42894
* TemplateControlCompiler.cs: When generating a property value,
check for TypeConverterAttribute in the PropertyInfo, not only in the
property type.
Implemented code generation using InstanceDescriptor, when the type
converter supports conversion to that type.
svn path=/trunk/mcs/; revision=40094
* Directive.cs: Added MASTER directive.
* AspGenerator.cs: Use UserControlCompiler for compiling master pages.
* PageCompiler.cs: Set the master file name when generating the page.
* TemplateControlCompiler.cs: When generating the method for a
content holder, register the content holder in the base MasterPage.
Added method for registering a Content control for a MasterPage.
Generate code for Content controls.
svn path=/trunk/mcs/; revision=39320
* TemplateControlCompiler.cs: Get the container type from the
template (if it was defined using TemplateContainerAttribute.
svn path=/trunk/mcs/; revision=38621
* BaseCompiler.cs: dynamicBase is now protected. Check
MONO_ASPNET_NODELETE here.
* TemplateControlCompiler.cs: if the type is not known but has a
TypeConverter, invoke ConvertFromString in the generated code.
* WebServiceCompiler.cs: it used a hardcoded C# compiler, now it gets
the compiler from the configuration. Also handle MONO_ASPNET_NODELETE.
* CachingCompiler.cs: updated compilation of web services and simple
web handlers.
svn path=/trunk/mcs/; revision=29255
* TemplateControlCompiler.cs: use CodeDelegateCreateExpression instead
of CodeObjectCreateExpression for the render method delegate. Thanks
to Jochen Wezel.
svn path=/trunk/mcs/; revision=28775
* System.Web/HttpApplicationFactory.cs: fixlet for session events hook.
* System.Web.Compilation/AspGenerator.cs: handle more possible errors
in global.asax file.
* System.Web.Compilation/BaseCompiler.cs: added utility methods for
creating <object> related properties and fields.
* System.Web.Compilation/GlobalAsaxCompiler.cs: keep around applications
and session scope objects builders. Also a list of imports and
assemblies added in global.asax.
* System.Web.Compilation/TemplateControlCompiler.cs: use base class
methods for <object> stuff.
* System.Web.UI/ApplicationFileParser.cs: check for error in directives.
Use GlobalAsaxCompiler.CompileApplicationType for compiling.
* System.Web.UI/ObjectTagBuilder.cs: load the Type and check for errors.
* System.Web.UI/TemplateParser.cs: add assemblies and imports from
global.asax.
Now we properly create accessors for session and application objects in
the application itself, pages and controls. First step for fixing
bug #53387.
svn path=/trunk/mcs/; revision=22584
attribute build a PartialCachingControl in the parents __Build method.
* BaseCompiler.cs: Add a method for adding class attributes to the
class.
* UserControlCompiler.cs: If caching is enabled on a user control
add the PartialCachingAttribute to it.
svn path=/trunk/mcs/; revision=22034
* TemplateControlCompiler.cs: support for expressions of
System.Drawing.Size type. Allow getting Color from comma separated
numbers, which is not allowed by ColorConverter.
This makes http://www.codeproject.com/aspnet/asppopup.asp work.
svn path=/trunk/mcs/; revision=20263
* TemplateControlCompiler.cs: fix bug #42994. Now we don't generate
a return statement for user controls with 'void' return type.
svn path=/trunk/mcs/; revision=19282