Commit Graph
102 Commits
Author SHA1 Message Date
Marek Habersack 66836ec00e 2007-10-10 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: be careful when using type
	converters taken from attributes attached to class members. They
	may come from the System.Design namespace, which is mostly not
	implemented on Mono.

svn path=/trunk/mcs/; revision=87255
2007-10-10 11:13:19 +00:00
Marek Habersack 694255e611 2007-09-27 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: support nullable types in
	GenerateExpressionFromString.

svn path=/trunk/mcs/; revision=86481
2007-09-27 11:24:44 +00:00
Marek Habersack 13f2e244d9 2007-09-21 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: if we're running on a platform with
            the directory separator character that's different to the Unix
            style '/' one, convert the input file path to the virtual path
            style string, with path parts separated by '/'. Patch from Robert
            Jordan <[email protected]>, thanks! Fixes bug #324229.

svn path=/trunk/mcs/; revision=86118
2007-09-20 23:13:27 +00:00
Marek Habersack 592d6443e9 2007-09-20 Marek Habersack <[email protected]>
* LoginView.cs: implemented RoleGroups support. Fixes bug
            #324633.

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

            * TemplateControlCompiler.cs: if a member passed to
            GetExpressionFromString has a TypeConverter attribute set, try to
            use the named type converter to convert the string value into the
            target type. Fixes bug #325489.


svn path=/trunk/mcs/; revision=86092
2007-09-20 18:01:19 +00:00
Marek Habersack 990cfe94bf 2007-09-10 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: cast the expression to the field
            type whenever appropriate in GetExpressionFromString.
            When generating an object instance and one of the parameters is
            System.Type, return a typeof expression.

svn path=/trunk/mcs/; revision=85591
2007-09-10 18:56:52 +00:00
Marek Habersack 753ef658e1 2007-09-07 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: another modification to the way
            TemplateInstance.Single templates are treated. The search for
            parent with this attribute set stops as soon as the first
            TemplateBuilder is encountered, no matter what the value of its
            TemplateInstance attribute is.

svn path=/trunk/mcs/; revision=85473
2007-09-07 12:14:26 +00:00
Marek Habersack f12771f14d 2007-09-06 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: Extend the process of checking if a control is located within a
            template with the TemplateInstance.Single attribute set, to all
            the parents of the current builder.

svn path=/trunk/mcs/; revision=85426
2007-09-06 15:38:43 +00:00
Marek Habersack 6412892874 2007-09-06 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: ID must be assigned as soon as
            possible, before any other attributes of the control are
            accessed. The control code may rely on ID being set.

svn path=/trunk/mcs/; revision=85386
2007-09-05 22:12:40 +00:00
Marek Habersack 313add1844 2007-09-04 Marek Habersack <[email protected]>
When generating code for a property or field, use the name
            retrieved from the metadata by reflection instead of the one
            parsed from html. Fixes bug #82687. Patch from SunHo Kim
            <[email protected]>, thanks

svn path=/trunk/mcs/; revision=85269
2007-09-04 12:03:37 +00:00
Marek Habersack 33d058da43 2007-09-04 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: make sure that base class doesn't
            contain a field of the same name which is accessible from the
            current control if we're within a singleton template.

svn path=/trunk/mcs/; revision=85248
2007-09-03 21:55:25 +00:00
Marek Habersack fae6aca6c4 2007-08-29 Marek Habersack <[email protected]>
* TemplateBuilder.cs: check for and store for later use the
            TemplateContainerAttribute. Added a nullable property
            TemplateInstance to return the value of the attribute.

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

            * TemplateControlCompiler.cs: mark fields corresponding to the
            controls as global references.
            When control tree is constructed and the parent of the current
            builder is a TemplateBuilder marked with the TemplateInstance
            attribute set to Single, use the control's ID as the field
            name. This makes it possible to refer to controls inside templates
            by name instead of by using FindControl.


svn path=/trunk/mcs/; revision=84996
2007-08-29 12:37:35 +00:00
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