Commit Graph
62 Commits
Author SHA1 Message Date
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
Gonzalo Paniagua Javier 43c346d458 2005-11-30 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: handle data bound attributes for html
	controls. Fixes bug #76785.


svn path=/trunk/mcs/; revision=53708
2005-11-30 21:36:52 +00:00
Miguel de Icaza 54079f764a Commit of changes to core files, on behalf of the team
svn path=/trunk/mcs/; revision=48944
2005-08-26 22:58:48 +00:00
Gonzalo Paniagua Javier 8d1b41006b 2005-07-11 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: in these cases, we're only interested in
	public properties/fields, not protected.


svn path=/trunk/mcs/; revision=47189
2005-07-11 22:20:52 +00:00
Gonzalo Paniagua Javier f2071e23e9 2005-06-26 Gonzalo Paniagua Javier <[email protected]>
* TagAttributes.cs:
	* AspParser.cs:
	* TemplateControlCompiler.cs: use invariant culture versions of starts/
	endswith.


svn path=/trunk/mcs/; revision=46532
2005-06-27 01:23:02 +00:00
Gonzalo Paniagua Javier 8db75a99ce 2005-06-25 Gonzalo Paniagua Javier <[email protected]>
* 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
2005-06-26 03:35:01 +00:00
Gonzalo Paniagua Javier c0c90d0904 2005-06-15 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: if the property is not found, don't forget
	about trying the field.


svn path=/trunk/mcs/; revision=46022
2005-06-15 07:30:21 +00:00
Gonzalo Paniagua Javier 37108a60c0 2005-06-11 Gonzalo Paniagua Javier <[email protected]>
* 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
2005-06-11 21:17:03 +00:00
Gonzalo Paniagua Javier 0a8b8fb7d8 2005-06-11 Gonzalo Paniagua Javier <[email protected]>
* 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
2005-06-11 20:34:59 +00:00
Gonzalo Paniagua Javier 08ea665cd2 2005-06-04 Gonzalo Paniagua Javier <[email protected]>
* 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
2005-06-04 21:15:30 +00:00
Gonzalo Paniagua Javier 5ec4fcf421 2005-04-20 Gonzalo Paniagua Javier <[email protected]>
* AspGenerator.cs:
	* TemplateControlCompiler.cs: removed warnings.


svn path=/trunk/mcs/; revision=43360
2005-04-20 22:18:19 +00:00
Lluis Sanchez 3088a4ad24 2005-04-15 Lluis Sanchez Gual <[email protected]>
* TemplateControlCompiler.cs: 


svn path=/trunk/mcs/; revision=43075
2005-04-15 20:42:02 +00:00
Lluis Sanchez 1258f1ed69 2005-04-14 Lluis Sanchez Gual <[email protected]>
* TemplateControlCompiler.cs: Use the new BindingContainerType
	property to find the type of the binding container. 
	

svn path=/trunk/mcs/; revision=42998
2005-04-14 12:24:50 +00:00
Lluis Sanchez 03b5c34ed7 2005-04-07 Lluis Sanchez Gual <[email protected]>
* 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
2005-04-13 09:01:03 +00:00
Lluis Sanchez c80e02b8ed 2005-04-05 Lluis Sanchez Gual <[email protected]>
* TemplateControlCompiler.cs: Don't autogenerate IDs for
	controls inside Content template.


svn path=/trunk/mcs/; revision=42556
2005-04-05 11:22:35 +00:00
Gonzalo Paniagua Javier 8cfab754a0 2005-03-18 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: make typedesc.aspx work again.


svn path=/trunk/mcs/; revision=42005
2005-03-18 19:30:53 +00:00
Lluis Sanchez 4fa3f910d8 2005-01-28 Lluis Sanchez Gual <[email protected]>
* 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
2005-02-04 00:04:05 +00:00
Lluis Sanchez e1e3b57371 2005-01-21 Lluis Sanchez Gual <[email protected]>
* 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
2005-01-21 18:03:58 +00:00
Lluis Sanchez 6332d086d6 2005-01-10 Lluis Sanchez Gual <[email protected]>
* TemplateControlCompiler.cs: Get the container type from the
	template (if it was defined using TemplateContainerAttribute.


svn path=/trunk/mcs/; revision=38621
2005-01-10 15:24:18 +00:00
Duncan Mak d1c09fcc67 Add licensing info
svn path=/trunk/mcs/; revision=30345
2004-06-24 20:59:43 +00:00
Gonzalo Paniagua Javier e640278680 2004-06-19 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: for system colors, use SystemColors class
	instead of Color. Fixes bug #60249.

svn path=/trunk/mcs/; revision=29936
2004-06-19 10:24:16 +00:00
Gonzalo Paniagua Javier 34fbc1363d 2004-06-11 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-06-11 04:03:13 +00:00
Gonzalo Paniagua Javier d67b6715cd 2004-06-03 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: use CodeDelegateCreateExpression instead
	of CodeObjectCreateExpression for the render method delegate. Thanks
	to Jochen Wezel.

svn path=/trunk/mcs/; revision=28775
2004-06-03 17:18:13 +00:00
Lluis Sanchez 81db054b23 * TemplateControlCompiler.cs: Fixed build for net_1_0 profile.
svn path=/trunk/mcs/; revision=24934
2004-04-01 22:51:21 +00:00
Jackson Harper 2d09971ed5 * TemplateControlCompiler.cs: Call ToString on the types hashcode,
the build method takes strings not ints.

svn path=/trunk/mcs/; revision=22614
2004-01-30 18:06:26 +00:00
Gonzalo Paniagua Javier 88bd37e884 2004-01-28 Gonzalo Paniagua Javier <[email protected]>
* 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
2004-01-28 22:19:23 +00:00
Gonzalo Paniagua Javier a7feec3356 2004-01-23 Gonzalo Paniagua Javier <[email protected]>
* TemplateControlCompiler.cs: allow handling subproperties for other
	types than Style and Font. Fixes bug #53217.

svn path=/trunk/mcs/; revision=22418
2004-01-23 07:00:13 +00:00
Jackson Harper 7e8fb6a4b2 * TemplateControlCompiler.cs: Is a user control is cached and
shared use the controls type hashcode for the GUID so it will be
	the same across instances.

svn path=/trunk/mcs/; revision=22079
2004-01-15 01:11:49 +00:00
Jackson Harper 478790c70c * TemplateControlCompiler.cs: If an item has the partial caching
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
2004-01-13 21:22:37 +00:00
Gonzalo Paniagua Javier 0834470382 2003-11-20 Gonzalo Paniagua Javier <[email protected]>
* 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
2003-11-20 08:03:06 +00:00