2010-01-20 Marek Habersack * ObjectStateFormatter.cs: implemented support for IndexedString on top of the existing StringFormatter. * IndexedString.cs: implemented 2009-12-22 Marek Habersack * Page.cs: form javascript declaration block is rendered only if necessary. Fixes bug #566541 * ClientScriptManager.cs: added internal property ScriptsPresent used to determine if it is necessary to render form javascript declaration block. Hidden fields block is output without indenting the controls and without rendering trailing empty line. Made Write{Begin,End}ScriptBlock slightly faster. 2009-12-18 Marek Habersack * ObjectStateFormatter.cs: ObjectFormatter.WriteObject checks whether candidate converter can convert from string now. Fixes bug #565547 2009-11-14 Marek Habersack * TemplateControl.cs: if writer is null in WriteUTF8ResourceString, use output.Write, not writer.Write. Fixes bug #547015 2009-11-10 Marek Habersack * TemplateParser.cs: AddImports is called from LoadConfigDefaults so that it reads configuration from the correct .config file (it needs to be called after this.VirtualPath has been initialized). Fixes an issue with MVC apps which put configuration in Views/web.config etc. Fixes bug #552457 * ControlBuilder.cs, Page.cs: system.web/pages section is not confined to the top-level web.config 2009-10-30 Marek Habersack * Control.cs: ResolveClientUrl takes base path from Request.ClientFilePath, so that it works correctly for rewritten urls. 2009-10-27 Marek Habersack * ObjectStateFormatter.cs: do not use a type converter to serialize an object if the converter is an instance of TypeConverter itself - its reported capability of converting to string is not useful here. 2009-10-12 Marek Habersack * ObjectStateFormatter.cs: if a type is associated with a type converter, do not check if the converter can convert FROM the type in question, as this is implied. Fixes bug #545979 2009-10-09 Marek Habersack * Control.cs: implemented the LoadViewStateByID property as well as saving/restoring the view state by control's ID. 2009-09-22 Marek Habersack * WebServiceParser.cs: GetCompiledType uses BuildManager on the 2.0 profile. Fixes bug #533166 2009-09-15 Marek Habersack * TemplateParser.cs: FindNamespaceInAssembly must catch ReflectionTypeLoadException so that it doesn't break on invalid assemblies. 2009-08-24 Marek Habersack * PageParser.cs: 2.0 profile takes advantage of the inputFile parameter to GetCompiledPageInstance. A check is made whether the file pointed to by this parameter is inside the application's virtual path and if not, the compilation request is assumed to refer to a fake location. Part of fix for bug #463813 2009-08-18 Marek Habersack * ControlBuilder.cs: Location property makes a copy of assigned ILocation now. 2009-08-14 Marek Habersack * ControlBuilder.cs: when CreateSubBuilder is called on a builder which is supposed to treat its children as properties and the default property builder is defined, first check if the tag which has just been parsed isn't a template property. If it is, don't use the default property builder, instead create a template property builder directly. Fixes bug #527753 2009-07-23 Marek Habersack * ControlBuilder.cs: added an internal helper property IsNamingContainer. 2009-07-21 Marek Habersack * SimpleWebHandlerParser.cs: make sure to ignore invalid bin/ assemblies in AddAssembliesInBin and GetTypeFromBin. 2009-06-15 Marek Habersack * TemplateParser.cs: AddAssembliesInBin (1.1 profile) tries to load every assembly in order to see if it's a valid one. All bad dll image errors are silently ignored. Fixes bug #315816 2009-06-05 Marek Habersack * Page.cs: InitializeTheme uses WebConfigurationManager.GetSection to retrieve page theme name. GetWebApplicationSection cannot be used because the system.web/pages section is valid also in subdirectories. Fixes bug #510302 2009-06-01 Marek Habersack * ClientScriptManager.cs: WriteHiddenFields doesn't add the id attribute to generated input element in the 1.1 profile. Fixes bug #508167. Patch from Hubert FONGARNAND , thanks! 2009-05-29 Marek Habersack * StateBag.cs: made SetDirty (bool) available on 1.1 as internal. Fixes bug #507836 2009-05-05 Marek Habersack * TemplateParser.cs: PageParserFilterType uses HttpApplication.LoadType so that it is able to load the filter from App_Code or with not fully qualified type names. 2009-05-04 Marek Habersack * TemplateParser.cs: take RootBuilder from the associated generator. Allow the main page directive to be added twice if the parser needs it. Used by AspGenerator when extracting the inherited type name before actual parsing. Fixes bug #500075 * FileLevelControlBuilderAttribute.cs, FileLevelPageControlBuilder.cs, FileLevelUserControlBuilder.cs: implemented * ControlBuilder.cs: added a new internal property, DataBindingMethod. Implemented ProcessGeneratedCode. 2009-04-30 Marek Habersack * TemplateParser.cs: removed the PageParserFilterTypeName property, the filter type name is looked up on demand now. * ApplicationFileParser.cs, MasterPageParser.cs, UserControlParser.cs: load config defaults explicitly after initializing the instance. 2009-04-29 Marek Habersack * DataBinder.cs: GetPropertyValue must throw also if propName is empty. 2009-04-24 Marek Habersack * TemplateParser.cs: PageParserFilter.Initialize now takes just one parameter. AddImport ignores null/empty namespaces. Fixes bug #498118 * PageParserFilter.cs: a few alignments for .NET compatibility in the default behavior. 2009-04-22 Marek Habersack * TemplateParser.cs: create the imports ArrayList before attempting to use it. Fixes bug #497174 2009-04-21 Marek Habersack * Page.cs: added support for OutputCacheParameters.NoStore to InitOutputCache. * SimpleWebHandlerParser.cs: retrieve CompilationSection from the appropriate web.config file. * BaseParser.cs: moved the internal property VirtualPath from TemplateParser to here and added an internal method GetConfigSection to retrieve sections from the correct web.config file on 2.0 applications. Fixes bug #494245 * PageParser.cs: use the new GetConfigSection method to retrieve ClientTargetSection. * TemplateParser.cs: moved the VirtualPath property to BaseParser. PagesConfig now uses the new GetConfigSection method. Fixes bug #494245 Added support for the SqlDependency, NoStore and CacheProfile attributes of the OutputCache directive. Fixes bug #496951 2009-04-15 Marek Habersack * TemplateParser.cs: use generic lists for import, namespace and interface caches. If a namespace is added (e.g. by parsing the Import directive), find the assembly in which namespace is defined. 2009-04-07 Marek Habersack * Control.cs: ApplyTheme - make sure Page is not null before using it. Fixes bug #492666 2009-04-06 Marek Habersack * Page.cs: ProcessRaiseCallbackEvent and ProcessGetCallbackResult now return full exception trace if one is caught and we're running in debugging mode. 2009-03-31 Marek Habersack * Page.cs: SavePageViewState saves the list of controls which require post back regardless of whether view state is disabled or not. Fixes bug #490753 * ApplicationFileParser.cs, MasterPageParser.cs, PageParser.cs, PageThemeFileParser.cs, PageThemeParser.cs, UserControlParser.cs, WebHandlerParser.cs, WebServiceParser.cs: 2.0 constructors take a VirtualPath instance for the virtualPath parameter, instead of a string. 2009-03-18 Marek Habersack * Control.cs: AppRelativeResourceDirectory no longer returns a hard-coded "~/" when template control's virtual path cannot be determined. It returns application relative version of TemplateSourceDirectory instead. 2009-03-13 Marek Habersack * Control.cs: clear the controls cache on control removal. This ensures that a subsequent FindControl call won't return the removed control. 2009-03-06 Marek Habersack * XPathBinder.cs: use the pased namespace manager * ControlBuilder.cs: BindingContainerType - if control type of the containing builder is null, return typeof (Control) 2009-03-03 Rodrigo Kumpera * Control.cs (FillControlCache): Remove useless control parameter. It's always the same of 'this'. 2009-03-03 Rodrigo Kumpera * DataBoundLiteralControl.cs: Don't init static literals as they are lazily created. 2009-02-28 Gonzalo Paniagua Javier * BaseParser.cs: * PageParser.cs: * ControlBuilder.cs: * TemplateParser.cs: * Page.cs: * SimpleWebHandlerParser.cs: settings that have to be in machine.config or the root level web.config now call GetWebApplicationSection. 2009-02-28 Gonzalo Paniagua Javier * ObjectStateFormatter.cs: use GetWebApplication instead of GetSection for application level configuration. 2009-02-28 Gonzalo Paniagua Javier * Control.cs: Avoid double OnInit in scenarios with two master pages. 2009-02-26 Marek Habersack * FileLevelControlBuilderAttribute.cs, DataSourceCacheDurationConverter: hush the gmcs warnings 2009-02-20 Gonzalo Paniagua Javier * TemplateControl.cs: implement the other ReadStringResource method. Patch from Kornel Pal. 2009-02-20 Gonzalo Paniagua Javier * ResourceBasedLiteralControl.cs: new Control. It's just like a LiteralControl but will render itself from the bytes pointed to by an IntPtr and not create any string from the underlying data unless needed. * TemplateControl.cs: implemented a bunch of methods that are used from the precompiled assemblies for a web project. The most notable change needed is to be able to read a win32 resource from the dll of the control. The resource is a concatenation of literals with plain text for the control and a specialized LiteralControl is generated from different chunks of the resource. * HtmlTextWriter.cs: new method that returns the HttpWriter in use. 2009-02-18 Gonzalo Paniagua Javier * TemplateControl.cs: ReadStringResource returns null now. 2009-02-18 Gonzalo Paniagua Javier * MasterPage.cs: the items in ContentPlaceHolders are lowercase. 2009-02-18 Marek Habersack * TemplateParser.cs: don't initialize PageParserFilter in LoadConfigDefaults, postpone it till the first time the PageParserFilter property is accessed. * ApplicationFileParser.cs, UserControlParser.cs: make sure VirtualPath is set in the constructors. 2009-02-13 Marek Habersack * TemplateParser.cs: PageParserFilter handling moved to here. PagesConfig must use the current virtual path when retrieving the section, or otherwise we'll miss the lower level web.configs. Added the AddControl method, used by PageParserFilter. Implementing filtering of: parsed directives and the base type, if a page parser filter is present. * PageParserFilter.cs: added missing 3.5 members and implemented everything. * PageParser.cs: moved PageParserFilter processing to TemplateParser. VirtualPath must be set before anything else. Call page parser filter's directive preprocessing code from AddDirective if a filter is present and a mastertype or previouspagetype directive is parsed. * MasterPageParser.cs: when PageParserFilter is present use it to preprocess the MasterType directive. 2009-02-12 Marek Safar * ControlBuilder.cs, PageParserFilter.cs, CodeConstructType.cs: Add few missing members. 2009-02-06 Gert Driesen * 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. 2009-02-05 Marek Habersack * 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 2009-02-04 Marek Habersack * 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. 2009-01-30 Marek Habersack * Control.cs: don't save the control's state if it's disabled. Fixes bug #470993 2009-01-23 Marek Habersack * 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 2009-01-13 Marek Habersack * 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-12 Marek Habersack * TemplateParser.cs: line pragmas are on by default. Fixes bug #460479 2009-01-09 Marek Habersack * BaseParser.cs, PageParser.cs, UserControlParser.cs: use VirtualPathUtility.GetDirectory instead of UrlUtils.GetDirectory. 2008-12-25 Gonzalo Paniagua Javier * TemplateControl.cs: use IndexOf (char). 2008-12-18 Marek Habersack * 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 #456305 2008-12-11 Marek Habersack * MasterPageParser.cs: check if masterType is null before using it in AddDirective. * 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-09 Gonzalo Paniagua Javier * XhtmlTextWriter.cs: don't recreate the Hashtables every time, but Clone the defaults. 2008-12-10 Marek Habersack * 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-03 Marek Habersack * 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. 2008-12-02 Gonzalo Paniagua Javier * Page.cs: make sure we don't return null in Title. 2008-12-02 Marek Habersack * 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. * 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. 2008-12-01 Marek Habersack * MasterPage.cs: use List for ContentPlaceHolders instead of ArrayList. CreateMasterPage now directly accesses the ContentPlaceHolders as it is now a list of strings. 2008-11-28 Marek Habersack * 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. 2008-11-25 Marek Habersack * 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-21 Marek Habersack * 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. 2008-11-18 Gonzalo Paniagua Javier * ControlBuilder.cs: make sure the binding container container is a naming container. 2008-11-18 Marek Habersack * ControlBuilder.cs: make sure no control implementing the INonBindingContainer can be returned from BindingContainerType. 2008-11-18 Gonzalo Paniagua Javier * ControlBuilder.cs: find the correct naming container even inside user controls. A corner case of bug #445889. 2008-11-15 Marek Habersack * 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-14 Marek Habersack * 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 2008-11-13 Marek Habersack * Control.cs: added ability to reset child names to a specific value, not only to 0. 2008-10-29 Marek Habersack * StateManagedCollection.cs: IList.Remove should call this.IndexOf instead of items.IndexOf 2008-10-24 Marek Habersack * 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. 2008-10-23 Marek Habersack * 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. * StateManagedCollection.cs: modified {Load,Save}ViewState to properly store/recreate the collection of controls and to use a more consistent structure for the state. 2008-10-17 Marek Habersack * 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-15 Marek Habersack * Page.cs: Response caching is switched on only when output caching is configured for this page instance. Fixes bug #435549. 2008-10-14 Marek Habersack * 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-08 Marek Habersack * 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-03 Marek Habersack * TemplateParser.cs: make sure the generated class name is a valid language independent identifier. Fixes bug #431622 2008-09-29 Marek Habersack * Page.cs: EnableViewState is initialized from the web configuration. ViewState is saved only if EnableViewState is true for the page. Optimized SavePageControlState implementation. Implemented the UniqueFilePathSuffix and MaxPageStateFieldLength properties. Some coding style changes. 2008-09-25 Marek Habersack * Page.cs: make sure view state is loaded for PreviousPage during cross-page postback. 2008-09-13 Atsushi Enomoto * IAutoFieldGenerator.cs : new in 3.5 SP1. 2008-09-13 Atsushi Enomoto * CssClassPropertyAttribute.cs : new in 3.5 SP1. 2008-09-13 Atsushi Enomoto * IBindableControl.cs : new in 3.5 SP1. 2008-09-01 Marek Habersack * 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. CreateSubBuilder compares tagid to tagName case-insensitively now. * 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-08-31 Marek Habersack * Control.cs: improved FillControlCache * 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). Added a cache for children of TemplateBuilder, used later in TemplateControlCompiler. 2008-08-26 Marek Habersack * 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. 2008-08-13 Marek Habersack * TemplateBuilder.cs: use a generic List to store the bindings on 2.0+ 2008-08-08 Marek Habersack * StateManagedCollection.cs: set all the contained objects state to dirty in SetDirty. 2008-07-28 Marek Habersack * 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-22 Gert Driesen * LosFormatter.cs (Deserialize): When stream is non-seekable, do not attempt to use properties that require a seekable stream. Based on patch provided by Dean Brettle (dean@brettle.com). Fixes bug #411115. 2008-07-16 Rodrigo Kumpera * DataBoundLiteralControl.cs: Lazily create staticLiterals. * DataBoundLiteralControl.cs (Render): Don't generate an intermediate string, write the content directly. 2008-07-14 Marek Habersack * 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. 2008-07-10 Roei Erez * ClientScriptManager.cs: Bug in javacript code, usind window scope instead of document. 2008-07-11 Marek Habersack * Control.cs: if adapter exists for the given control, use it for rendering. Patch from Christian Hergert , thanks! 2008-07-10 Roei Erez * Page.cs: Differentiate between IPostBackEventHandler that was registered by the user, and one that was given as post parameter, so that in case ther post data may trigger both IPostBackEventHandler and IPostBackDataHandler, only the IPostBackDataHandler is actually triggered. 2008-07-09 Rodrigo Kumpera * DataBinder.cs (GetDataItem): Commited stupid code. 2008-07-09 Rodrigo Kumpera * DataBinder.cs (GetDataItem): Use a per-thread cache for property lookup. 2008-07-02 Rodrigo Kumpera * Control.cs: Fix the lookup in ResolveAdapter that I broke in the previous change. 2008-07-02 Rodrigo Kumpera * Control.cs: Optimize ResolveAdapter a bit more. 2008-07-02 Rodrigo Kumpera * Control.cs: Optimize the Adapter property and ResolveAdapter a bit. 2008-07-01 Rodrigo Kumpera * TemplateControl.cs: Kill a foreach loop. 2008-06-30 Marek Habersack * TemplateParser.cs: use atomic incrementation for automatic class name creation to avoid Monitor Enter/Exit. * UserControlParser.cs: hush the warnings and remove unnecessary code. * ControlCachePolicy.cs, PageParser.cs, ControlBuilder.cs, TemplateParser.cs, SimpleWebHandlerParser.cs, TemplateControl.cs, ApplicationFileParser.cs: hush the warnings * Page.cs: Context is protected internal in .NET 3.5 Initialize encryption IVs before returning the transform. * Control.cs: in 2.0 we should return the context associated with the current page. In 1.0 we ignore the never set field _context and keep walking up the parent chain. Also, Context is protected internal in .NET 3.5 Hush the warnings. 2008-06-27 Zoltan Varga * Control.cs (ResolveAdapter): Avoid calling the Context property getter multiple times. * TemplateControl.cs: Avoid collecting the automatic event info for each instance. 2008-06-18 Juraj Skripsky * Page.cs (ProcessException): Throw HttpUnhandledException instead of TargetInvocationException to match .NET. Fixes bug #400482. 2008-06-18 Marek Habersack * BasePartialCachingControl.cs: implemented the CachePolicy property. * UserControl.cs: implemented the CachePolicy property. * ControlCachePolicy.cs: implemented missing properties and methods. 2008-06-11 Marek Habersack * TemplateControl.cs: make sure 'type' isn't null in LoadControl before attempting to use it. 2008-06-10 Noam Lampert * TemplateControl.jvm.cs: Don't assume that controls containing page-specific callbacks (e.g. Page_LoadComplete) are necessarily Page derivatives. 2008-06-04 Juraj Skrispky * PageParser.cs (ProcessMainAttributes): Take value of enableEventValidation from web.config into account. Fixes bug #397099. 2008-06-04 Marek Habersack * PageHandlerFactory.cs: this class should be public. Fixes bug #396707 2008-05-30 Marek Habersack * DataBindingCollection.cs, ExpressionBindingCollection.cs: do not use synthetized event accessors (to avoid locks). 2008-05-28 Marek Habersack * ReadOnlyDataSourceView.cs: added. Patch contributed by James Fitzsimons , thanks! * TemplateParser.cs: added support for #pragma checksum 2008-05-19 Juraj Skripsky * Page.cs (ValidateCollection): Don't check _eventValidation, it has nothing to do with the validators. 2008-05-16 Marek Habersack * StateManagedCollection.cs: make {Save,Load}ViewState simpler. 2008-05-15 Marek Habersack * StateManagedCollection.cs: do not query for index of an item in a null array. 2008-05-07 Marek Habersack * TemplateParser.cs: added a stack of include directories, to properly resolve file relative paths when the #include file="" directive is used. Fixes bug #324536 2008-05-05 Igor Zelmanovich * HiddenFieldPageStatePersister.cs: add TARGET_J2EE def * Page.cs: remove TARGET_J2EE def * Page.jvm.cs: add new internal api such PageState and FacesContext. all those changes make PageAdapter works with JSF under TARGET_J2EE. 2008-04-24 Marek Habersack * RootBuilder.cs: when registering a custom control, add its path to the parser dependencies. Fixes bug #377915 In the 2.0 profile, if the custom control being used was registered from web.config and is found in the same directory what the file being parsed, throw an exception. This behavior matches MS.NET. * TemplateParser.cs: added new VirtualPath property, which stores the virtual path to the file being parsed. * PageParser.cs: set the VirtualPath property in the 2.0 profile when constructing the parser. 2008-04-23 Marek Habersack * TemplateParser.cs: constructs the VirtualPath using the current parser's BaseVirtualDirectory. Fixes bug #381715 2008-04-19 Marek Habersack * SimpleWebHandlerParser.cs: refactoring - move code between constructors, reader should be set before initializing the rest of the object. Fixes bug #381364 * TemplateParser.cs: RegisterCustomControl must use absolute virtual path when querying the virtual path provider for file. Fixes bug #381364 2008-04-18 Marek Habersack * ObjectStateFormatter.cs: ObjectFormatter.WriteObject should not use a converter if it can't convert _from_ the type of the object being written to the stream. Fixes issues with serializing, e.g., a DataSet. 2008-04-14 Marek Habersack * SimpleWebHandlerParser.cs, TemplateParser.cs, AspGenerator.cs: make sure streams are disposed the way they should be. 2008-04-10 Marek Habersack * Control.cs: refactoring - IdSeparator property is internally present also in 1.1. 2008-04-08 Dean Brettle * Page.cs (PageAdapter): fixed cast error when a ControlAdapter that wasn't a PageAdapter was used. 2008-04-08 Marek Habersack * TemplateParser.cs: CodeFile/Src handling uses HostingEnvironment.VirtualPathProvider to check for file existence. 2008-04-02 Marek Habersack * Page.cs: make SetContext internal (used from tests). 2008-04-01 Marek Habersack * TemplateControl.cs: ParseControl implemented for the 2.0 profile. * UserControlParser.cs: added support for compiling controls without input file (e.g. from TemplateControl.ParseControl). * TemplateParser.cs: implemented VirtualPathProvider support for registering UserControls. If there is no input file path provided, auto-generate the class name in the ClassName property getter. 2008-03-27 Marek Habersack * Page.cs: added an implementation of the ClientQueryString property. 2008-03-13 Marek Habersack * TemplateParser.cs: HttpApplication.BinaryDirectories property no longer exists, use HttpApplication.BinDirectory instead. 2008-03-09 Dean Brettle * Page.cs (SavePageControlState, LoadPageControlState): save/load adapter state in 2.0 profile. * Page.cs (CreateHtmlTextWriter): call Browser.CreateHtmlTextWriter() in 2.0 profile. * Page.cs (RenderPage): call CreateHtmlTextWriter() to get the writer in 2.0 profile. * Page.cs (DeterminePostBackMode, InitOutputCache, RenderClientScriptFormDeclaration, InternalProcessRequest, PageStatePersister): added support for PageAdapters. * Control.cs (Adapter, ResolveAdapter): implemented. Adapter calls ResolveAdapter and remembers result. ResolveAdapter checks for adapters of the Type hierarchy until it finds one. * Control.cs (SaveViewStateRecursive, LoadViewStateRecursive): save/load adapter state in 2.0 profile. * HtmlTextWriter.cs (BeginRender, EndRender): added empty virtual methods required by 2.0 profile. These are called by corresponding methods of System.Web.UI.Adapters.ControlAdapter. * Page.cs, Control.cs: don't access Request.Browser if it couldn't have any adapters/writers because there are no files in App_Browsers/. 2008-03-09 Marek Habersack * TemplateControlParser.cs: 2.0 allows controls with extensions different than .ascx, as long as they derive from System.Web.UI.UserControl and a build provider is available for them. * TemplateParser.cs: user controls must derive from System.Web.UI.UserControl. * SimpleWebHandlerParser.cs: if the input file doesn't contain the correct directive string (tag name is empty for the <%@ %> tag), use the default directive. 2008-02-28 Marek Habersack * TemplateControlParser.cs: when registering a control, check for the .ascx extension case-insensitively. Fixes bug #364995 2008-02-28 Igor Zelmanovich * Control.cs: fixed exception propagation in case of multiple control with same id were found. 2008-02-26 Marek Habersack * TemplateParser.cs: a better error message. * ControlBuilder.cs: if one of the parent builders is a TemplateBuilder, use it as the naming container and use its ContainerType property as the value of the BindingContainerType property. 2008-02-25 Marek Habersack * ControlBuilder.cs: correctly chain up to the parent builder when looking for the naming container. 2008-02-21 Marek Habersack * ControlBuilder.cs: introduced a new internal property - MyNamingContainer used by the public properties NamingContainerType and BindingContainerType. This simplifies the code in the latter property, as the binding container type must almost always be the same as the naming container type. The only exception is when we're inside a content builder, in which case we return the parent's BindingContainerType. Fixes bug #363665 2008-02-12 Vladimir Krasnov * Page.jvm.cs: StateSerializer.readExternal and writeExternal fixed to support viewstate encryption 2008-02-12 Vladimir Krasnov * ObjectStateFormatter.cs: revert of 91820 2008-02-08 Marek Habersack * SimpleWebHandlerParser.cs: always return a non-null value from the Program property. * TemplateParser.cs: make sure that the Src attribute is treated correctly in the 2.0 profile. Fixes bug #319016 2008-02-07 Vladimir Krasnov * Page.jvm.cs: added StateSerializer class, fixed processSaveState, processRestoreState 2008-02-07 Marek Habersack * PageHandlerFactory.cs: call PageParser.GetCompiledPageInstance only - that method calls the appropriate APIs for 1.1 and 2.0 profiles. 2008-02-06 Vladimir Krasnov * Control.cs: fixed ResolveClientUrlInternal for portal url prefixes 2008-02-04 Marek Habersack * SimpleWebHandlerParser.cs: use WebEncoding.FileEncoding when reading the source file. 2008-01-30 Igor Zelmanovich * ObjectStateFormatter.cs: ensure ReaderContext.GetCache called with positive arg to prevent from ArgumentOutOfRange being thrown. 2008-01-29 Igor Zelmanovich * ObjectStateFormatter.cs: has public constructor. 2008-01-29 Vladimir Krasnov * Page.cs: performance optimization of DeterminePostBackMode 2008-01-24 Marek Habersack * PageThemeFileParser.cs: the DefaultBaseType property removed. * ApplicationFileParser.cs: added constructor which takes a TextReader. Removed the DefaultBaseType property. Added the Reader property. * MasterPage.cs: use BuildManager to create page instance. * WebHandlerParser.cs: added a compatibility constructor. * TemplateControl.cs: GetTypeFromControlPath uses BuildManager.GetCompiledType for the 2.0+ profile. * WebServiceParser.cs: added a compatibility internal constructor. * SimpleWebHandlerParser.cs: properly treat context and physicalPath parameters to the constructor, especially for the 2.0+ profile where they are obsolete. Dependencies are added using virtual paths. * PageThemeParser.cs: DefaultBaseType property removed. * Page.cs: Style sheets and themes are compiled using BuildManager. Previous page instance is compiled using BuildManager for the 2.0+ profile. * MasterPageParser.cs: Use BuildManager to create instance and compile types. Dependencies are added using virtual paths. * SimpleHandlerFactory.cs: Use BuildManager.CreateInstanceFromVirtualPath for the 2.0+ profile. * UserControlParser.cs: if the parser is created using a TextReader, take the input file path from the virtual path. Added a new internal constructor which takes both a TextReader and an inputFile parameters. Set base type to the default in the constructors. Use virtual path when setting master page dependency. DefaultBaseTypename doesn't use a literal string in the 2.0+ profile, it gets the base type from the application configuration. * TemplateControlParser.cs: Dependency on a control/page mentioned in the Reference directive is registered using the virtual path. TextReader property is an override now. * TemplateParser.cs: RegisterCustomControl adds a dependency on the virtual path, not the physical path. The custom control is compiled using BuildManager.GetCompiledType for the 2.0+ profile. RegisterNamespace does not add a dependency on the assembly. LoadType does not add a dependency on the assembly. Legacy Src attribute is handled properly now. Dependency on code-behind (Src and CodeFile directive attributes) is added using the code-behind file's virtual path. GetAssemblyFromSource adds a dependency using the virtual path. DefaultBaseType implemented here, using DefaultBaseTypeName which is implemented in the descendant classes. Added internal CodeBehindSource property, used by build providers. ClassName property works correctly if inputFile is missing (e.g. when the parser has been created using a TextReader) Added a virtual internal property TextReader to return the readed which has been used to create the parser instance. * PageHandlerFactory.cs: GetHandler uses BuildManager.CreateInstanceFromVirtualPath for the 2.0+ profile. * PageParser.cs: set the default base type in the constructors. If the input file is not passed to a constructor, take the input file path from the virtual path. GetCompiledPageInstance uses BuildManager.CreateInstanceFromVirtualPath for the 2.0+ profile. MasterPage dependency is set using the virtual path of the master page. MasterPage is compiled into a type using BuildManager.GetCompiledType. GetCompiledPageType uses BuildManager.GetCompiledType for the 2.0 profile. DefaultBaseType override removed, it is implemented in the TemplateParser class. DefaultBaseTypename doesn't use a literal string in the 2.0+ profile, it gets the base type from the application configuration. 2008-01-17 Igor Zelmanovich * Control.cs: fix ResolveUrl for some cases. 2008-01-17 Igor Zelmanovich * Control.cs: consider changes in BaseCompiler.cs. 2008-01-14 Igor Zelmanovich * Control.cs: fixed ResolveClientUrl. use Context.FilePath instead of Context.CurrentExecutionPath for resolvint app. releative path. 2008-13-01 Vladimir Krasnov * Page.jvm.cs: optimized SetupResponseWriter, fixed getChildCount and getChildren methods * Control.jvm.cs: fixed getChildCount method 2008-01-09 Igor Zelmanovich * Page.cs: * ClientScriptManager.cs: refactoring. 2008-01-07 Igor Zelmanovich * Page.cs: added internal API * IScriptManager.cs: added new internal interface. 2008-01-07 Igor Zelmanovich * ClientScriptManager.cs: * Control.jvm.cs: * Page.cs: * Page.jvm.cs: for TARGET_J2EE ensure page life cycle is completed in CrossPagePostBack. 2008-01-07 Marek Habersack * TemplateParser.cs: handle legacy 'src' attribute in the 2.0 profile in the correct way. Fixes bug #319016 BaseType is global by default. 2008-01-02 Marek Habersack * TemplateParser.cs: added a wrapper class for server-side script snippets, to keep track of locations. Store main directive location for later use in DirectiveLocation internal property. 2008-01-01 Igor Zelmanovich * Page.cs: make SubmitDisabledControls and SetFocus works in multiform environment 2007-12-31 Vladimir Krasnov * Page.cs: fixed thread abort handling in ProcessRequest 2007-12-27 Marek Habersack * TemplateParser.cs: check for base type globality also when the default type is used. 2007-12-26 Igor Zelmanovich * Control.cs: * Page.cs: make Trace considers control state info. 2007-12-20 Igor Zelmanovich * Page.cs: refactoring: split method such InternalProcessRequest to several methods. It is required for implementing alternative hosting under TARGET_J2EE. 2007-12-20 Marek Habersack * ClientScriptManager.cs: write hidden fields inside a div only in the 2.0 profile. Fixes bug #349991 2007-12-20 Igor Zelmanovich * Page.cs: * Control.cs: * ClientScriptManager.cs: refactoring: removed Page.LifeCycle internal API, used Control's stateMask flag instead. 2007-12-17 Marek Habersack * TemplateParser.cs: support the 'Src' directive attribute on 2.0 profile as well as on the 1.1 one. Fixes bug #319016 2007-12-16 Igor Zelmanovich * Page.cs: on CrossPagePostBack previous page is processed by Execute API, that allow CurrentHandler property works correctly during Page processing. 2007-12-15 Marek Habersack * SimpleWebHandlerParser.cs: Default value for Debug is taken from the compilation config section. * TemplateParser.cs: Added LoadConfigDefaults here, loads default value for Debug from the compilation section. Cache CompilationConfig in methods where it is accessed more than once. Default value for Debug in ProcessMainAttributes is taken from the compilation config. * PageParser.cs, TemplateControlParser.cs: LoadPagesConfigDefaults renamed to LoadConfigDefaults. 2007-12-13 Marek Habersack * ClientScriptManager.cs, MasterPageParser.cs, Control.cs, Page.cs: speed optimization - use String.Concat instead of String.Format in some cases. 2007-12-13 Igor Zelmanovich * Page.cs: - When Transfer/Execute is called with preserveForm=true, transferred page is not processed as PostBack but form collection is preserved. - When Execute is called more than once, PreviousPage property is set correct. 2007-11-22 Marek Habersack * OutputCacheParameters.cs: added the VaryByContentEncoding property. * Page.cs: added new InitCache overload. * TemplateParser.cs: added support for the VaryByContentEncodings attribute of the OutputCache directive. 2007-11-19 Vladimir Krasnov * Page.jvm.cs: IsMultiForm optimized, cached configuration call 2007-11-14 Marek Habersack * SimpleWebHandlerParser.cs: expect GetTypeFromBin to be called with a fully qualified type name and act accordingly. Fixes bug #341456. 2007-11-13 Igor Zelmanovich * ClientScriptManager.cs: Ensure a script resource is included once in multi form environment. 2007-11-07 Igor Zelmanovich * PageParser.cs: fixed initial value of tracemode. 2007-11-07 Igor Zelmanovich * Control.cs: removes '#define MONO_TRACE'. It allows to run MONO in release mode without supplementary trace info. 2007-11-07 Igor Zelmanovich * Page.cs: added missing trace information for NET_2_0 2007-11-06 Igor Zelmanovich * Page.cs: * Page.jvm.cs: affects TARGET_J2EE only: validators state (isValid) is restored on GetBack. 2007-11-06 Marek Habersack * Page.cs: formatting 2007-11-05 Marek Habersack * ClientScriptManager.cs: EventStateFieldName is a constant now. * Page.cs: use full control ids when processing post data. Fixes bug #317615 2007-11-03 Marek Habersack * Control.cs: need to append a "/" to TemplateSourceDirectory before calling VirtualPathUtility.Combine, in order to get the correct physical path to the requested file. Combine looks for the last occurrence of "/" to determine where the relative paths should be joined. * MinimizableAttributeTypeConverter.cs: don't throw on null value, call the base class method in that case. * SimpleWebHandlerParser.cs: don't NRE on a null assembly passed to AddAssembly. AddAssemblyByName must check the return value of Assembly.LoadWithPartialName, as the method doesn't throw on missing assembly, it returns null instead. * ClientScriptManager.cs: eventValidationArray is serialized in an optimized fashion, so that its serialized form occupies only as many slots as were actually used. It may result in that an array of 0 entries will be serialized and then restored. EnsureEventValidationArray takes that into consideration now. 2007-11-01 Marek Habersack * Page.cs, ObjectStateFormatter.cs: use the new MachineKeySectionUtils class wherever necessary. 2007-10-29 Marek Habersack * TemplateParser.cs: add the file pointed to by the Src or CodeFile attributes to the list of page cache dependencies. * PageParser.cs, UserControlParser.cs: Add the MasterPage file to the list of page cache dependencies. * MasterPageParser.cs: add the source pointed to by VirtualPath to the list of cache dependencies. 2007-10-23 Marek Habersack * ClientScriptManager.cs: added two constants to define start/end script block comments rendering. 1.1 uses HTML comments, while 2.0 uses a CDATA block. * Page.cs: render script blocks with start/end comments taken from the ClientScriptManager constants above. 2007-10-17 Marek Habersack * TemplateParser.cs: removed code that ignored the Async and AsyncTimeout attributes. * PageParser.cs: handle the Async and AsyncTimeout attributes here. Fixes bug #325450 * Control.cs: properly configure control visibility in PreRenderRecursiveInternal. The check must be made by looking at the Visible value, not at the flags directly. Fixes bug #325303 2007-10-03 Marek Habersack * Page.cs: complete implementation of ValidationGroups. Fixes bug #330423. Patch from Juraj Skripsky , thanks! 2007-10-02 Marek Habersack * SimpleWebHandlerParser.cs: fix the way types are loaded from top-level assemblies. 2007-10-01 Marek Habersack * Page.cs: do not set IsPostBack to true if we're in transfer from another page. Fixes bug #329341 2007-09-18 Marek Habersack * TemplateParser.cs: VaryByControl OutputCache attribute is allowed for both controls and pages in 2.0. 2007-09-11 Marek Habersack * WebServiceParser.cs: inputFile is a virtual path to the service, not a physical one in GetCompiledType. 2007-09-05 Marek Habersack * RootBuilder.cs: make Foundry settable, but protect the backing field from being set to null. 2007-09-04 Marek Habersack * TemplateParser.cs: don't optimize for case when 'name' is a full assembly name in AddAssemblyByName. Assembly.Load triggers the AssemblyResolve event on the current AppDomain if an assembly isn't found and we use this mechanism to map names like "App_Code" or "App_GlobalResources" to the real names of those dynamic assemblies. 2007-09-02 Igor Zelmanovich * Page.jvm.cs: implemented IsMultiForm property to take the value from configuration. 2007-08-30 Igor Zelmanovich * Page.cs: fixed MaintainScrollPositionOnPostBack feature. 2007-08-29 Marek Habersack * 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 Vladimir Krasnov * Control.cs: optimized performance in InitControlsCache() 2007-08-28 Marek Habersack * Page.cs: The following property values are returned from cached fields instead of looking them up on Context: Application, Response, Request, Cache (as determined by the tests). Added a backing field for the Session property. Session doesn't throw an exception when Context is null - it silently ignores it and throws a session not available exception. _context is never used directly, the Context property is used instead. Fixes bug #82606 2007-08-23 Juraj Skripsky * Control.cs (InitControlsCache): Make the hash table case insensitive to make FindControl compatible with MS.net again. Add LAMESPEC note. 2007-08-23 Marek Habersack * SimpleWebHandlerParser.cs: use HttpApplication.BinDirectoryAssemblies in AddAssembliesInBin and LoadAssemblyFromBin. Restore the old logic in GetTypeFromBin, also use HttpApplication.BinDirectoryAssemblies there. * TemplateParser.cs: use HttpApplication.BinDirectories to interate over the list of bin dirs. Use HttpApplication.BinDirectoryAssemblies in AddAssembliesInBin. 2007-08-23 Igor Zelmanovich * ClientScriptManager.cs: encode values of hidden fields. 2007-08-21 Marek Habersack * SimpleWebHandlerParser.cs: use HttpApplication.PrivateBinPath enumerator when loading or adding assemblies from binary directories. Remove unused PrivateBinPath property. * ControlBuilder.cs: remove unused PrivateBinPath property. * TemplateParser.cs: use HttpApplication.PrivateBinPath when adding assemblis and loading types. 2007-08-21 Igor Zelmanovich * ClientScriptManager.cs: fixed onsubmit script for MultiForm environment 2007-08-20 Marek Habersack * MasterPage.cs: use the place holder IDs collection instead of the placholder collection to see if we have the place holder in the master page. Fixes bug #82485. * MasterPageParser.cs: store the content place holder ids in the internal cache to gain access to them when needed. 2007-08-19 Vladimir Krasnov * MasterPageParser.jvm.cs: optimized GetDirectory call * PageTheme.cs: optimized string formatting in CreateSkinKey 2007-08-19 Vladimir Krasnov * Page.cs: ResetEventValidationState call moved back to InternalProcessRequest 2007-08-19 Marek Habersack * Page.cs: make sure not to ever pass a null value as the value of the postCollection parameter to control's LoadPostData. The ProcessPostData's 'data' parameter is no longer passed to LoadPostData, instead we pass _requestValueCollection or an empty collection if it is null. The controls should always get all the request data, no matter if the 'data' parameter is null or not. Possible fix for bug #82477. 2007-08-18 Gert Driesen * MasterPage.cs: Include relative URL of MasterPage in exception message. 2007-08-18 Marek Habersack * MasterPage.cs: if a ContentPlaceHolder ID is not found in the associated MasterPage, throw an exception. This is compatible with what MS.NET does. Fixes bug #82447. 2007-08-15 Igor Zelmanovich * Page.cs: fixed: - avoid NullRefferenceException from Title property when Page does not have * CssStyleCollection.cs: put the style in the bag each time a key is set, otherwise resetting of a key has no effect on rendered style. 2007-05-07 Marek Habersack * TemplateParser.cs: added support for implicit language detection. If the language isn't set explicitly in the Page directive, the language value taken from the configuration considered to be implicit - that is, it can be overwritten by the first