* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* ControlBuilder.cs: make sure no control implementing the
INonBindingContainer can be returned from BindingContainerType.
svn path=/trunk/mcs/; revision=119233
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* Page.cs: Implemented the UniqueFilePathSuffix and MaxPageStateFieldLength
properties.
Some coding style changes.
svn path=/trunk/mcs/; revision=114432
* Page.cs: EnableViewState is initialized from the web
configuration.
ViewState is saved only if EnableViewState is true for the page.
Optimized SavePageControlState implementation.
svn path=/trunk/mcs/; revision=114431
* ControlBuilder.cs: CreatePropertyBuilder now correctly processes
property names with prefixes (e.g. 'prefix:PropertyName').
Original, parsed, tag name is stored to properly handle closing
tags.
2008-09-01 Marek Habersack <[email protected]>
* AspGenerator.cs:
CloseControl uses ControlBuilder's OriginalTagName property,
should the property/tag name be prefixed with 'prefix:'
svn path=/trunk/mcs/; revision=112003
* TemplateControl.cs: changed the way in which ParseControl is
implemented for the 2.0+ profile. Still not quite there, but
better and closer to .NET
2008-09-01 Marek Habersack <[email protected]>
* BaseCompiler.cs: AssignAppRelativeVirtualPath works with
null/empty parser.InputFile now.
* AspGenerator.cs: AddTypeToCache works checks whether inputFile
is null or empty and does not assume the dependencies ArrayList is
present.
* CachingCompiler.cs: expect the dependencies ArrayList to be null
or empty.
svn path=/trunk/mcs/; revision=111998
* TemplateControlCompiler.cs:
Templates are processed before anything else, so that children
which may depend on parent's templates can get access to them.
2008-08-31 Marek Habersack <[email protected]>
* Control.cs: improved FillControlCache
* ControlBuilder.cs:
Added a cache for children of TemplateBuilder, used later in
TemplateControlCompiler.
svn path=/trunk/mcs/; revision=111990
* TemplateParser.cs: added support for the LinePragmas directive
attribute.
* ControlBuilder.cs: if this instance is a TemplateBuilder do not
call MyNamingContainer, so that our own ContainerType can be used
as the binding container (if present).
2008-08-31 Marek Habersack <[email protected]>
* TemplateControlCompiler.cs: trust builder.BindingContainerType
in the 2.0+ profile - do not use container properties to detect
the type.
Added a helper method, compiled only when DEBUG is defined, to
generate Console.WriteLine CodeDOM calls.
* BaseCompiler.cs: add line pragmas only if enabled for the
current file.
svn path=/trunk/mcs/; revision=111983
* TemplateControlParser.cs: added support for the VirtualPath
attribute of the Reference directive.
In the 2.0 profile, all the references are compiled using
BuildManager.GetCompiledType now.
svn path=/trunk/mcs/; revision=111589
* TemplateControlCompiler.cs: rewrote the Bind regular expressions
to allow for single quotes and an optional second parameter to the
"call".
Added an Eval regular expression.
Both Bind and Eval calls in data expressions are now converted
into a CodeDOM method invocations, to allow support for possible
languages which use a different call format (previously code
snippets were used)
Added a method to construct the Eval invoke expression which
simplifies code in other areas.
2008-08-13 Marek Habersack <[email protected]>
* TemplateBuilder.cs: use a generic List to store the bindings on
2.0+
2008-08-13 Marek Habersack <[email protected]>
* HttpException.cs: do not use StringBuilder.AppendFormat when
there is no need.
svn path=/trunk/mcs/; revision=110385
* MasterPage.cs: decouple processing of content templates in
CreateMasterPage from checking whether all the content place
holder ids are defined. Fixes bug #325114
2008-07-28 Marek Habersack <[email protected]>
* StandardUrl.cs: added a new standard url -
PAGE_WITH_MASTER_INVALID_PLACE_HOLDER.
2008-07-28 Marek Habersack <[email protected]>
* MyPageWithMasterInvalidPlaceHolder.aspx: added
2008-07-28 Marek Habersack <[email protected]>
* MasterPageTest.cs: added a test for situations when a page tries
to use a content place holder not defined in the associated master
page (bug #325114)
2008-07-28 Marek Habersack <[email protected]>
* NunitWeb/Makefile (NunitWeb.dll): added dependency on
NunitWeb/Resources/MyPageWithMasterInvalidPlaceHolder.aspx, it is
also included in the resources.
svn path=/trunk/mcs/; revision=108975
Do not invoke Length property twice for seekable MemoryStream.
* LosFormatterTest.cs: Improved test for bug #411115.
svn path=/trunk/mcs/; revision=108506
* Page.cs: fix the failing tests by moving the form
RaisePostBackEvent code up in RaisePostBackEvents, so that
Validate () isn't called together with the registered post back
events.
svn path=/trunk/mcs/; revision=107911
* Control.cs: if adapter exists for the given control, use it for
rendering. Patch from Christian Hergert
<[email protected]>, thanks!
svn path=/trunk/mcs/; revision=107708