1186 Commits
Author SHA1 Message Date
Gert Driesen 215b9c88cf * Control.cs: Make IsViewStateEnabled available on 1.0 profile
and use it to determine if viewstate needs to be saved instead of
the newly introduced ViewStateShouldBeSaved. Remove
ViewStateShouldBeSaved.

svn path=/trunk/mcs/; revision=126025
2009-02-06 11:34:39 +00:00
Marek Habersack 08c59df0f6 2009-02-05 Marek Habersack <[email protected]>
* Control.cs: if a control has been added to the controls
	collection, removed and added again do not call OnInit (). At the
	same time OnInit() should be called more than once if a control is
	added to a container which, in turn, is then added to another
	control. To achieve that a new state mask flag has been added -
	REMOVED. Fixes bug #471305

svn path=/trunk/mcs/; revision=125798
2009-02-05 00:56:56 +00:00
Marek Habersack f10126e819 2009-02-04 Marek Habersack <[email protected]>
* Control.cs: update of the fix for bug #470993 - view state of
	the child controls isn't saved when any of their parents has it
	disabled.

svn path=/trunk/mcs/; revision=125663
2009-02-04 10:44:57 +00:00
Marek Habersack 98ad9d57a0 2009-01-30 Marek Habersack <[email protected]>
* Control.cs: don't save the control's state if it's
	disabled. Fixes bug #470993

svn path=/trunk/mcs/; revision=125111
2009-01-30 16:52:34 +00:00
Marek Habersack 15e7dec4cd Copied a few more stub files
svn path=/trunk/mcs/; revision=124784
2009-01-28 15:37:05 +00:00
Marek Habersack 3fd8028d75 More attribution/header updates
svn path=/trunk/mcs/; revision=124783
2009-01-28 15:25:02 +00:00
Marek Habersack 7f146e5225 Added copies of some .jvm.cs files
svn path=/trunk/mcs/; revision=124780
2009-01-28 14:51:30 +00:00
Marek Habersack 1556223283 Added attribution and copyright headers
svn path=/trunk/mcs/; revision=124779
2009-01-28 14:42:28 +00:00
Marek Habersack c3e912b67d 2009-01-23 Marek Habersack <[email protected]>
* HtmlTextWriter.cs: if OnTagRender returns false when called from
	RenderBeginTag, push the tag to the stack regardless, and ignore
	it in DoBeginTag and RenderEndTag. Fixes bug #463634

svn path=/trunk/mcs/; revision=124377
2009-01-23 21:49:12 +00:00
Marek Habersack bc0513683f set svn:eol-style to native and converted several files to unix line ending
svn path=/trunk/mcs/; revision=124209
2009-01-22 14:52:09 +00:00
Marek Habersack 3fcbf0735a 2009-01-13 Marek Habersack <[email protected]>
* CodeBuilder.cs, RootBuilder.cs, CollectionBuilder.cs: updates
	related to ControlBuilder cleanup.

	* ControlBuilder.cs: code cleanup - no field should be visible
	outside the class unless it's a constant or a read-only field.

2009-01-13  Marek Habersack  <[email protected]>

	* XmlBuilder.cs: updates related to ControlBuilder cleanup.

2009-01-13  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs, AspGenerator.cs, BaseCompiler.cs,
	GlobalAsaxCompiler.cs, PageThemeCompiler.cs: updates related to
	ControlBuilder cleanup.


svn path=/trunk/mcs/; revision=123229
2009-01-13 18:38:18 +00:00
Marek Habersack 0d7e4c54f6 LinePragmas default to true if value is not present
svn path=/trunk/mcs/; revision=123142
2009-01-12 22:29:31 +00:00
Marek Habersack e31e5f40cc Forgotten ChangeLog
svn path=/trunk/mcs/; revision=123115
2009-01-12 19:45:43 +00:00
Marek Habersack 6e8c180f09 Reverted r123106
svn path=/trunk/mcs/; revision=123113
2009-01-12 19:42:35 +00:00
Marek Habersack dbd6e55cdc 2009-01-12 Marek Habersack <[email protected]>
* LiteralStringControlBuilder.cs: added. Fixes bug #461214

	* ControlBuilder.cs: added location tracking for literal string
	children. Fixes bug #461214

	* TemplateParser.cs: line pragmas are on by default. Fixes bug
	#460479

2009-01-12  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: the LiteralStringControlBuilder
	class is now used to track the location of the plain strings being
	output to the generated code. Fixes bug #461214

	* AspGenerator.cs: AppendLiteralString is called with the current
	parser location as one of its parameters in FlushText (). Fixes
	bug #461214

2009-01-12  Marek Habersack  <[email protected]>

	* System.Web.dll.sources: added
	System.Web.UI/LiteralStringControlBuilder.cs


svn path=/trunk/mcs/; revision=123106
2009-01-12 18:53:41 +00:00
Marek Habersack 5be8f882cb 2009-01-12 Marek Habersack <[email protected]>
* TemplateParser.cs: line pragmas are on by default. Fixes bug
	#460479

svn path=/trunk/mcs/; revision=123090
2009-01-12 16:50:23 +00:00
Marek Habersack 45cccd09d5 2009-01-09 Marek Habersack <[email protected]>
* BaseParser.cs, PageParser.cs, UserControlParser.cs: use
	VirtualPathUtility.GetDirectory instead of UrlUtils.GetDirectory.

svn path=/trunk/mcs/; revision=122893
2009-01-09 14:41:30 +00:00
Gonzalo Paniagua Javier 1aa7e69351 2008-12-25 Gonzalo Paniagua Javier <[email protected]>
* TemplateControl.cs: use IndexOf (char).


svn path=/trunk/mcs/; revision=122110
2008-12-25 07:28:29 +00:00
Marek Habersack b62e106bbd 2008-12-18 Marek Habersack <[email protected]>
* ControlBuilder.cs: BindingContainerType returns typeof (Page)
	only when the current object is a RootBuilder and it's been
	created for a page parser. Otherwise it returns typeof
	(Control). Fixes bug #45630

svn path=/trunk/mcs/; revision=121752
2008-12-18 01:18:50 +00:00
Marek Habersack c3abcb4e51 2008-12-11 Marek Habersack <[email protected]>
* MasterPageParser.cs: check if masterType is null before using it
	in AddDirective.

svn path=/trunk/mcs/; revision=121287
2008-12-11 11:51:44 +00:00
Marek Habersack 8b9adb2940 2008-12-11 Marek Habersack <[email protected]>
* TemplateParser.cs: in the 2.0 profile when a custom control is
	registered, do not compile it right away but store the tag name in
	a registry to be compiled at a later stage.

2008-12-11  Marek Habersack  <[email protected]>

	* BaseCompiler.cs: added a new method, InitializeType, to be
	overriden in child classes when any class initialization needs to
	be performed before methods, constructors and fields are created.

	* TemplateControlCompiler.cs: if the parser has any custom
	controls registered, compile them here - in the InitializeType
	method.

svn path=/trunk/mcs/; revision=121262
2008-12-10 23:45:04 +00:00
Gonzalo Paniagua Javier 8995c8cb80 2008-12-09 Gonzalo Paniagua Javier <[email protected]>
* XhtmlTextWriter.cs: don't recreate the Hashtables every time, but
	Clone the defaults.


svn path=/trunk/mcs/; revision=121197
2008-12-10 07:11:20 +00:00
Marek Habersack d0135f374d 2008-12-10 Marek Habersack <[email protected]>
* MasterPageParser.cs: do not compile anything while
	parsing. MasterType virtual path is not compiled, but stored for
	later. It is compiled when the MasterType property is requested
	from within MasterPageCompiler.

	* PageParser.cs: do not compile anything while
	parsing. MasterPageFile, MasterType and PreviousPageType virtual
	paths aren't compiled but checked for existence and stored for
	later. Actual compilation happens when the MasterType and
	PreviousPageType are requested from within PageCompiler.

	* BaseParser.cs: added a new helper method, ThrowParseFileNotFound.

2008-12-10  Marek Habersack  <[email protected]>

	* ParseException.cs: made serializable.

	* PageCompiler.cs: CreateStronglyTypedProperty calls
	AddReferencedAssembly to add type's assembly to the unit's
	references after the typed property has been created.

	* BaseCompiler.cs: added a new helper method,
	AddReferencedAssembly to be used whenever an assembly location
	needs to be added to the compilation unit's list after the parsing
	is done (e.g. when processing PreviousPageType or MasterPageType
	properties in PageParser)

2008-12-10  Marek Habersack  <[email protected]>

	* Makefile (TEST_RESOURCE_FILES): added
	Test/mainsoft/NunitWebResources/MissingMasterFile.aspx

	* System.Web_test.dll.sources: added System.Web.UI/PageParserTest.cs

2008-12-10  Marek Habersack  <[email protected]>

	* NunitWebResources/MissingMasterFile.aspx: added

2008-12-10  Marek Habersack  <[email protected]>

	* PageParserTest.cs: added



svn path=/trunk/mcs/; revision=121181
2008-12-10 02:03:35 +00:00
Marek Habersack 60f6913978 2008-12-03 Marek Habersack <[email protected]>
* System.Web_test.dll.sources: added System.Web.UI/DataBinderTest.cs

2008-12-03  Marek Habersack  <[email protected]>

	* DataBinderTest.cs: added

2008-12-03  Marek Habersack  <[email protected]>

	* DataBinder.cs: clean up Eval for good this time.
	GetIndexedPropertyValue should throw an exception when a string
	indexer expression is used and the container is an IList.

svn path=/trunk/mcs/; revision=120590
2008-12-03 13:33:05 +00:00
Gonzalo Paniagua Javier 20e96bae9a 2008-12-02 Gonzalo Paniagua Javier <[email protected]>
* Page.cs: make sure we don't return null in Title.


svn path=/trunk/mcs/; revision=120550
2008-12-03 00:06:23 +00:00
Marek Habersack 42d4ec2ad5 2008-12-02 Marek Habersack <[email protected]>
* DataBinder.cs: when Eval attempts to find Items [] in the
	container, catch and ignore all exceptions - the null returned
	from GetPropertyValue may be a legitimate return value.

svn path=/trunk/mcs/; revision=120485
2008-12-02 14:28:05 +00:00
Marek Habersack c257964940 2008-12-02 Marek Habersack <[email protected]>
* StateManagedCollection.cs: adding an item to the collection does
	not call SetDirty as an item is added, thus not affecting the
	indexes of its predecessors. Fixes bug #443100
	Insert doesn't call SetDirtyObject as all objects are made dirty
	in SetDirty which is called from here. Same applies to this [int]
	indexer.

svn path=/trunk/mcs/; revision=120436
2008-12-02 01:07:39 +00:00
Marek Habersack 5d39b8a41c 2008-12-01 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: instead of adding ContentPlaceHolder
	instances to the ContentPlaceHolders collection when the
	placeholder is instantiated in the control build method, collect
	the ids and store them in ContentPlaceHolders inside the
	constructor. Fixes bug #449970
	For each content placeholder generate a public virtual property
	named "Template_PLACEHOLDERID", this is compatible with what .NET
	does.

	* BaseCompiler.cs: added new virtual method,
	AddStatementsToConstructor, which is called just before
	CreateConstructor returns.

2008-12-01  Marek Habersack  <[email protected]>

	* MasterPage.cs: use List <string> for ContentPlaceHolders instead
	of ArrayList.
	CreateMasterPage now directly accesses the ContentPlaceHolders as
	it is now a list of strings



svn path=/trunk/mcs/; revision=120353
2008-12-01 14:45:16 +00:00
Marek Habersack f2494e1db0 2008-11-28 Marek Habersack <[email protected]>
* DataBinder.cs: do the proper thing in Eval when a non-indexed
	property is requested on an object and not found. In that case try
	to use the Items property.

svn path=/trunk/mcs/; revision=120199
2008-11-28 01:43:09 +00:00
Marek Habersack fa32fdf482 2008-11-25 Marek Habersack <[email protected]>
* System.Web.dll.sources: added
	System.Web.Compilation/AspComponent.cs

2008-11-25  Marek Habersack  <[email protected]>

	* RootBuilder.cs: use new API in AspComponentFoundry to retrieve
	registered control type.

	* TemplateControlParser.cs: AddControlImports () removed. Its
	functionality is now implemented in ControlBuilder.AddChild in a
	more elegant, fine grained and correct way.

	* TemplateParser.cs: replaced some "" with String.Empty

	* ControlBuilder.cs: AddChild now adds an import for child's
	namespace if the control being added has been registered in the
	web.config file. Possible fix for #447896 and #447898

	* PageParser.cs, MasterPageParser.cs: do not call
	AddControlImports, it no longer exists.

2008-11-25  Marek Habersack  <[email protected]>

	* AspComponentFoundry.cs: GetComponentType methods replaced with
	GetComponent returning an instance of AspComponent which fully
	describes the registered item. Components are cached, indexed by
	full tag name.

	* AspComponent.cs: added

svn path=/trunk/mcs/; revision=119893
2008-11-25 00:51:21 +00:00
Marek Habersack a2bad5bd17 2008-11-21 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: make the Bind regex stricter.
	When creating Eval expression from Bind, replace single quotes
	with double quotes. Fixes bug #447597
	When processing Bind expressions and the regex doesn't match,
	throw an exception.

2008-11-21  Marek Habersack  <[email protected]>

	* ControlBuilder.cs: in BindingContainerType if builder is a
	RootBuilder and no naming container is found, return typeof
	(Page). In the TemplateBuilder case return cb.ControlType, not
	this.ControlType.

svn path=/trunk/mcs/; revision=119661
2008-11-21 19:27:51 +00:00
Gonzalo Paniagua Javier cdac72488f 2008-11-18 Gonzalo Paniagua Javier <[email protected]>
* ControlBuilder.cs: make sure the binding container container is a
	naming container.


svn path=/trunk/mcs/; revision=119269
2008-11-19 04:06:46 +00:00
Marek Habersack 49df583968 2008-11-18 Marek Habersack <[email protected]>
* ControlBuilder.cs: make sure no control implementing the
	INonBindingContainer can be returned from BindingContainerType.

svn path=/trunk/mcs/; revision=119233
2008-11-18 22:18:41 +00:00
Gonzalo Paniagua Javier 9bf26ae78e 2008-11-18 Gonzalo Paniagua Javier <[email protected]>
* ControlBuilder.cs: find the correct naming container even inside
	user controls. A corner case of bug #445889.


svn path=/trunk/mcs/; revision=119130
2008-11-18 07:16:13 +00:00
Marek Habersack cd9089259b 2008-11-15 Marek Habersack <[email protected]>
* ContentPlaceHolder.cs, Content.cs, FormViewPagerRow.cs,
	ChangePassword.cs, DetailsViewPagerRow.cs: implements
	INonBindingContainer interface.

	* Wizard.cs: implement INonBindingContainer interface for several
	private/internal classes.

2008-11-15  Marek Habersack  <[email protected]>

	* INonBindingContainer.cs: added

	* Control.cs: BindingContainer now checks if a control implements
	INonBindingContainer interface in addition to the
	BINDING_CONTAINER mask check.

	* UserControl.cs: implements INonBindingContainer

	* ControlBuilder.cs: use the new INonBindingContainer interface to
	determine the binding container type in the BindingContainerType
	property. If TemplateBuilder's ContainerType implements that
	interface, the NamingContainer is queried for the binding
	container type. If ContainerType is null, we return our own
	ControlType (if we're TemplateBuilder)

2008-11-15  Marek Habersack  <[email protected]>

	* System.Web.dll.sources: added System.Web.UI/INonBindingContainer.cs

svn path=/trunk/mcs/; revision=118917
2008-11-15 03:40:24 +00:00
Marek Habersack 3b49c0ba8b 2008-11-14 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: treat Eval and Bind expressions as
	verbatim code. The only difference between the two is that in the
	latter case Bind is replaced with Eval in the output code. Fixes
	bug #444725

2008-11-14  Marek Habersack  <[email protected]>

	* DataBinder.cs: if Eval doesn't find the indicated property, try
	to find an indexer property on the object and use the expression
	value as its parameter. Fixes #444725

svn path=/trunk/mcs/; revision=118799
2008-11-14 00:41:03 +00:00
Marek Habersack eb9632d1c7 2008-11-13 Marek Habersack <[email protected]>
* Control.cs: added ability to reset child names to a specific
	value, not only to 0.

svn path=/trunk/mcs/; revision=118683
2008-11-13 01:31:59 +00:00
Marek Habersack d7542695ba 2008-10-29 Marek Habersack <[email protected]>
* StateManagedCollection.cs: IList.Remove should call this.IndexOf
	instead of items.IndexOf

svn path=/trunk/mcs/; revision=117375
2008-10-29 14:45:39 +00:00
Marek Habersack 50f49de67c 2008-10-24 Marek Habersack <[email protected]>
* TemplateControl.cs: pass content hash to
	UserControlParser.GetCompiledType when compiling a control in
	ParseControl.

	* UserControlParser.cs: when compiling a control using a text
	reader, append a unique suffix to the "file path" - that way
	controls compiled from different input streams won't conflict with
	each other in the compilation cache.

svn path=/trunk/mcs/; revision=116979
2008-10-24 19:36:59 +00:00
Marek Habersack d9ffa572e2 2008-10-23 Marek Habersack <[email protected]>
* TemplateControlParser.cs: added internal method
	AddControlImports which adds namespaces named in the
	pages/controls section of web.config

	* MasterPageParser.cs: unconditionally add namespaces named in the
	pages/controls section of web.config.

	* PageParser.cs: add namespaces named in the pages/controls
	section of web.config to the page whenever it uses a master page.

svn path=/trunk/mcs/; revision=116858
2008-10-23 16:09:10 +00:00
Marek Habersack 11d95c8817 2008-10-23 Marek Habersack <[email protected]>
* StateManagedCollection.cs: modified {Load,Save}ViewState to
	properly store/recreate the collection of controls and to use a
	more consistent structure for the state.

svn path=/trunk/mcs/; revision=116818
2008-10-23 00:13:01 +00:00
Marek Habersack ef9c9e51ce Do not abuse the 'private' keyword
svn path=/trunk/mcs/; revision=116539
2008-10-20 17:37:54 +00:00
Marek Habersack f3bc4a2f46 Use UNIX line endings consistently
svn path=/trunk/mcs/; revision=116241
2008-10-17 15:26:06 +00:00
Marek Habersack 81c4068d12 2008-10-17 Marek Habersack <[email protected]>
* ImageMap.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in Render ().

	* DropDownList.cs, ListBox.cs: validate the event in LoadPostData ().

	* TextBox.cs: validate the event in LoadPostData ().
	Register for event validation in AddAttributesToRender ().

	* HiddenField.cs: validate the event in RaisePostDataChangedEvent.
	Register for event validation in Render ().

	* RadioButton.cs: validate the event in LoadPostData ().
	Register for event validation in InternalAddAttributesToRender.

	* CheckBox.cs, RadioButtonList.cs: validate the event in
	RaisePostDataChangedEvent.

	* Menu.cs: added the SupportsEventValidation attribute to the
	class.
	Validate the event in RaisePostBackEvent ().
	Register for event validation in GetClientEvent ().

	* DetailsView.cs, GridView.cs: validate the event in
	RaisePostBackEvent ().
	Register for validation in GetCallbackScript () and in OnPreRender

	* Button.cs, Table.cs, BulletedList.cs, Calendar.cs, LinkButton.cs,
	ImageButton.cs, TreeView.cs: validate the event in RaisePostBackEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* Control.cs: added the ValidateEvent internal method, used by
	classes descending from Control to automatically trigger event
	validation.

	* Page.cs: removed the CheckForValidationSupport method. It moved
	to Control.cs
	RaisePostBackEvent no longer validates the events, this
	functionality has been moved to Control.ValidateEvent.

2008-10-17  Marek Habersack  <[email protected]>

	* HtmlInputHidden.cs: validate the event in LoadPostDataInternal.

	* HtmlInputButton.cs: validate the event in
	RaisePostBackEventInternal ().
	Register for event validation in RenderAttributes ()

	* HtmlTextArea.cs: validate the event in
	RaisePostBackDataChangedEvent ().

	* HtmlButton.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ()

	* HtmlAnchor.cs: validate the event in RaisePostBackEvent ().
	Register for event validation in RenderAttributes ().

	* HtmlInputRadioButton.cs, HtmlSelect.cs: validate the event in
	LoadPostData.

	* HtmlInputText.cs, HtmlInputImage.cs, HtmlInputCheckBox.cs,
	HtmlInputPassword.cs: validate the event in
	RaisePostDataChangedEvent ().

2008-10-17  Marek Habersack  <[email protected]>

	* MenuAdapterTest.cs: work around event validation failure in the
	test environment.

2008-10-17  Marek Habersack  <[email protected]>

	* PageTest.cs: use a custom version of HtmlInputHidden control to
	work around the new event validation code which doesn't work in
	this instance.

svn path=/trunk/mcs/; revision=116231
2008-10-17 14:56:19 +00:00
Marek Habersack 5b94dd8088 2008-10-15 Marek Habersack <[email protected]>
* HttpResponse.cs: CacheabilityUpdatedEvent is no longer
	used. cached_response is allocated only when the IsCached property
	is assigned the 'true' value. 

	* HttpCachePolicy.cs: CacheabilityUpdatedEvent is no longer used,
	removed all the traces of it. SetCacheability should not switch
	output caching on.

2008-10-15  Marek Habersack  <[email protected]>

	* OutputCacheModule.cs: do not take any action if Response returns
	null from GetCachedResponse.

2008-10-15  Marek Habersack  <[email protected]>

	* Page.cs: Response caching is switched on only when output
	caching is configured for this page instance. Fixes bug #435549.

svn path=/trunk/mcs/; revision=115861
2008-10-15 12:31:16 +00:00
Marek Habersack 071470bef4 2008-10-14 Marek Habersack <[email protected]>
* Control.cs: SaveViewStateRecursive must return view state even
	if EnableViewState is false. This is apparently what .NET does, as
	some commercial ASP.NET controls take advantage of that via
	reflection.

2008-10-14  Marek Habersack  <[email protected]>

	* CompositeDataBoundControl.cs: renamed the itemcount ViewState
	item from "_ItemCount" to "_!ItemCount" for .NET
	compatibility. This item is accessed and used by some commercial
	ASP.NET controls.

	* DataBoundControl.cs: OnPagePreLoad must force databinding also
	when the request is not a postback.

svn path=/trunk/mcs/; revision=115766
2008-10-14 11:36:32 +00:00
Atsushi Eno f9180a15be this too :(
svn path=/trunk/mcs/; revision=115239
2008-10-08 16:13:20 +00:00
Marek Habersack 7bbd8d5027 2008-10-08 Marek Habersack <[email protected]>
* ControlParameter.cs: Evaluate calls DataBinder.Eval to do the
	evaluation now. This makes it support complex expressions.

2008-10-08  Marek Habersack  <[email protected]>

	* DataBinder.cs: in Eval expression needs to be trimmed before
	checking whether it's an empty string.
	GetIndexedPropertyValue must explicitly look for the "Item"
	property, the lack of the DefaultMember attribute on type must not
	throw exceptions.

2008-10-08  Marek Habersack  <[email protected]>

	* ControlParameterTest.cs: added a test for ControlParameter
	evaluating a complex property expression.

svn path=/trunk/mcs/; revision=115193
2008-10-08 10:31:17 +00:00
Marek Habersack f0d6c8fe78 2008-10-03 Marek Habersack <[email protected]>
* TemplateParser.cs: make sure the generated class name is a valid
	language independent identifier. Fixes bug #431622

2008-10-03  Marek Habersack  <[email protected]>

	* BuildManager.cs: if an assembly fails to build out of a batch of
	files, extract the virtual path that was requested by the client
	and attempt to compile it alone.

svn path=/trunk/mcs/; revision=114732
2008-10-03 07:53:06 +00:00
Marek Habersack 4ed96de44f 2008-09-29 Marek Habersack <[email protected]>
* Page.cs: Implemented the UniqueFilePathSuffix and MaxPageStateFieldLength
	properties.
	Some coding style changes.

svn path=/trunk/mcs/; revision=114432
2008-09-29 19:31:27 +00:00