74 Commits
Author SHA1 Message Date
Zoltan Varga 032f313d5f [bcl] Remove NET_4_0 defines from class libs. 2015-01-13 16:06:31 -05:00
Marek Habersack 885455cc37 [asp.net] Fix for bug #681421. Use VirtualPathProvider.CombineVirtualPaths
The method is used by the parsers to look up dependencies, sources, controls
and master pages.
2011-03-22 21:24:59 +01:00
Daniel J Sell d53c11003d [asp.net] Fix for bug #653192. making MasterPageFile handle relative paths
MasterPageFile should be relative to the file being parsed, not the
request path
2010-11-12 11:21:40 +01:00
Marek Habersack 83876018b4 [asp.net] Fix for bug #643298. A typo prevented the EnableViewStateMac from being recognized in the Page directive. 2010-10-05 08:04:16 +02:00
Marek Habersack 51e6b86309 [asp.net,4.0] Added support for setting default base types for various kinds of resources.
ASP.NET 4.0 allows one to set base types for Pages, User Controls, Application and PageParserFilter
from the pre-application start method(s). This commit implements support for this mechanism.

* ApplicationFileParser.cs: added override of DefaultBaseType property which checks whether
  PageParser.DefaultApplicationBaseType is set and, if yes, uses it to set application base type
  if there's no custom Global.asax
* PageParser.cs: implemented the EnableLongStringsAsResources, DefaultPageBaseType, DefaultApplicationBaseType,
  DefaultPageParserFilterType and DefaultUserControlBaseType properties.
* TemplateParser.cs: if PageParser.DefaultPageParserFilterType is set, use it as the default type to create instance
  of the page parser filter
* Added tests for the new properties.
* Added support in standalone runner for setting custom application domain data on domain creation, just before
  the test is ran.
2010-08-06 22:27:08 +02:00
Marek Habersack 3a84414136 [asp.net] Made TemplateParser.CompileIntoType internal
This method was present only in 1.0 and 1.1 profiles. It's made internal because
we use it throughout our code.
2010-08-06 22:27:08 +02:00
Marek Habersack d8838a6414 This commit introduces a few 4.0 rendering changes which break some tests. The broken tests
fail to work on .NET 4.0 as well, for the most part. I will fix them next week.

    2010-07-02  Marek Habersack  <[email protected]>

    	* TemplateControlParser.cs: added support for ClientIDMode
    	property

    	* Control.cs: implemented 4.0 features - ClientIDMode and
    	RenderingCompatibility.

    	* ClientIDMode.cs, IDataKeysControl.cs: added

    2010-07-02  Marek Habersack  <[email protected]>

    	* Menu.cs: 4.0 API updates.

    	* GridView.cs: implemented 4.0 properties -
    	SortedAscendingCellStyle, SortedAscendingHeaderStyle,
    	SortedDescendingCellStyle, SortedDescendingHeaderStyle,
    	ClientIDRowSuffix, ClientIDRowSuffixDataKeys, ShowHeaderWhenEmpty
    	along with associated rendering changes.

    	* DetailsView.cs, FormView.cs, GridView.cs: 4.0 API changes -
    	renamed ShowPage to SetPageIndex and made it public.
    	Added 4.0 interfaces to inheritance list and implemented them.

    	* DataKeyArray.cs: added internal constructor which accepts IList
    	instead of ArrayList. Changed the 'keys' field type to IList.

    	* ContainedTable.cs: the 'id' attribute must be rendered last.

    	* CheckBox.cs, CheckBoxList.cs, SiteMapPath.cs, Table.cs,
    	TableStyle.cs, TextBox.cs, WebControl.cs: 4.0 rendering changes.

    	* Calendar.cs, CompositeControl.cs, DropDownList.cs, HyperLink.cs,
    	Image.cs, ImageButton.cs, Label.cs, LinkButton.cs, LoginName.cs,
    	Panel.cs, Table.cs, TableCell.cs, TableRow.cs:
    	added new 4.0 property, SupportsDisabledAttribute.

    2010-07-02  Marek Habersack  <[email protected]>

    	* VersionConverter.cs: added support for checking whether the
    	passed version is equal or more than a specified minimal version.

    	* PagesSection.cs: added two 4.0 properties - ClientIDMode and
    	ControlRenderingCompatibilityVersion

    2010-07-02  Marek Habersack  <[email protected]>

    	* TemplateControlCompiler.cs: added support for ClientIDMode 4.0
    	property

    	* PageCompiler.cs, UserControlCompiler.cs: AddStatementsToInitTop
    	must call the base implementation.

svn path=/trunk/mcs/; revision=159826
2010-07-02 19:12:31 +00:00
Marek Habersack 0b08553dbc 2010-06-01 Marek Habersack <[email protected]>
* HtmlHead.cs: added code to render description and keywords metas
	if the corresponding HtmlMeta controls aren't found and the user
	set either Description or Keywords properties.

2010-06-01  Marek Habersack  <[email protected]>

	* TemplateControlCompiler.cs: added new virtual method,
	AddStatementsToInitMethodBottom and renamed
	AddStatementsToInitMethod to AddStatementsToInitMethodTop.

	* PageCompiler.cs: code to set Meta{Description,Keywords}
	properties, if present.

2010-06-01  Marek Habersack  <[email protected]>

	* PageParser.cs: added support for MetaDescription and
	MetaKeywords main directive attributes

	* Page.cs: implemented MetaDescription and MetaKeywords
	4.0 properties.

svn path=/trunk/mcs/; revision=158303
2010-06-01 22:01:28 +00:00
Marek Habersack 5411dd0e2a 2010-05-19 Marek Habersack <[email protected]>
* PageParser.cs: handle several main directive attributes
    	specially, as they can have expressions as their values. Fixes bug
    	#603532

    	* MainDirectiveAttribute.cs: added - helper class to handle
    	directive attributes which can take either a value or an
    	expression.

    	* BaseParser.cs: IsDirective, IsExpression and IsDataBound methods
    	moved to here from TemplateControlCompiler.

    2010-05-19  Marek Habersack  <[email protected]>

    	* TemplateControlCompiler.cs: IsDirective, IsExpression and
    	IsDataBound methods moved to System.Web.UI.BaseParser.
    	Made CompileExpression and GetFieldOrProperty methods internal.

    	* PageCompiler.cs: check several of the Page directive attributes
    	for expressions. Fixes bug #603532

    	* AspGenerator.cs, TagAttributes.cs: use IDictionary instead of
    	Hashtable

svn path=/trunk/mcs/; revision=157519
2010-05-19 01:28:09 +00:00
Marek Habersack 3f81315ae9 2010-04-12 Marek Habersack <[email protected]>
* PageCompiler.cs: if EnableViewStateMac is set in the page
	source, generate relevant code.

2010-04-12  Marek Habersack  <[email protected]>

	* PageParser.cs: if EnableViewStateMac option is present in the
	directive, remember it for later use by the compiler.

	* Page.cs: initialize EnableViewStateMac with the default read
	from the config.

svn path=/trunk/mcs/; revision=155262
2010-04-12 19:37:54 +00:00
Gonzalo Paniagua Javier c4b08a1fc0 undo
svn path=/trunk/mcs/; revision=154498
2010-03-30 21:22:16 +00:00
Gonzalo Paniagua Javier 4ac0c2f561 2010-03-30 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/PageParser.cs:
	* System.Web.UI/Page.cs:
	* System.Web.Compilation/PageCompiler.cs: default for
	EnableViewStateMac is true. Allow setting it from a @Page
	directive.


svn path=/trunk/mcs/; revision=154493
2010-03-30 21:00:21 +00:00
Marek Habersack 5e9719f57c Gotten rid of NET_2_0 ifdefs and 1.1 code from System.Web.UI
svn path=/trunk/mcs/; revision=149929
2010-01-20 21:21:01 +00:00
Marek Habersack 5c59801fff Performance improvements:
- made sure invariant culture is used with String.ToLower, String.ToUpper and String.Compare
- replaced all calls to CultureInfo.InvariantCulture with a reference to a static field System.Web.Util.Helpers.InvariantCulture

svn path=/trunk/mcs/; revision=143587
2009-10-07 00:10:03 +00:00
Marek Habersack b6969f355f 2009-08-24 Marek Habersack <[email protected]>
* 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-24  Marek Habersack  <[email protected]>

	* PageBuildProvider.cs: MapPath now takes a VirtualPath
	instance. Part of fix for bug #463813

	* BuildManager.cs: public APIs which take virtual path strings as
	their parameters got internal counterparts accepting a VirtualPath
	instance in place of string. Part of fix for bug #463813

	* GenericBuildProvider.cs:
	MapPath now takes a VirtualPath instance. Part of fix for bug
	#463813

2009-08-24  Marek Habersack  <[email protected]>

	* SoapDocumentationHandler.cs: get rid of the ugly fake virtual
	path hack when creating the helper page. Part of fix for bug
	#463813

2009-08-24  Marek Habersack  <[email protected]>

	* VirtualPath.cs: Added new constructor which takes virtual and
	physical paths as well as a boolean marking the instance as
	referring to a fake location. Part of fix for bug #463813

svn path=/trunk/mcs/; revision=140548
2009-08-24 20:34:57 +00:00
Marek Habersack 1c50013daa 2009-04-21 Marek Habersack <[email protected]>
* 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

svn path=/trunk/mcs/; revision=132300
2009-04-21 17:54:02 +00:00
Marek Habersack e9a0173141 2009-03-31 Marek Habersack <[email protected]>
* All of the below are part of the fix for bug #489687

	* ThemeDirectoryCompiler.cs: pass VirtualPath instances to parser
	constructors.

	* BuildProvider.cs: associated virtual path is stored internally
	as an instance of VirtualPath, accessible via new
	VirtualPathInternal property.

	* BuildManagerDirectoryBuilder.cs: VirtualPath.IsFake is used to
	detect fake virtual paths.
	GetBuildProvider now takes a VirtualPath instead of string for the
	virtualPath parameter. The passed VirtualPath instance is passed
	unchanged to BuildProvider.

	* BuildManager.cs: AssertVirtualPathExists now uses
	VirtualPath.IsFake to check for fake virtual paths.

	* ApplicationFileBuildProvider.cs, GenericBuildProvider.cs,
	MasterPageBuildProvider.cs, PageBuildProvider.cs,
	ThemeBuildProvider.cs, UserControlBuildProvider.cs,
	WebHandlerBuildProvider.cs, WebServiceBuildProvider.cs:
	CreateParser overloads now take a VirtualPath instead of a string
	for the virtualPath parameter.

	* ThemeBuildProvider.cs: use new parser constructors which take
	VirtualPath instances instead of strings.

2009-03-31  Marek Habersack  <[email protected]>

	* VirtualPath.cs: added code to detect whether the VirtualPath
	instance represents a fake virtual path (IsFake property).
	Added new property DirectoryNoNormalize which returns
	non-normalized directory for the VirtualPath instance.
	Made ToString () a bit more friendly and well-behaved.

2009-03-31  Marek Habersack  <[email protected]>

	* 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.

svn path=/trunk/mcs/; revision=130665
2009-03-31 15:01:21 +00:00
Gonzalo Paniagua Javier 871da8a251 2009-02-28 Gonzalo Paniagua Javier <[email protected]>
* 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.



svn path=/trunk/mcs/; revision=128273
2009-02-28 20:04:36 +00:00
Marek Habersack 5df8b478b6 2009-02-13 Marek Habersack <[email protected]>
* AspParser.cs: added an event raised when parsing is complete.

	* AspGenerator.cs: added support for PageParserFilter which, if
	found, is used to control certain aspects of code parsing
	(accepting/rejecting control types, accepting/rejecting code
	snippets, parsing completion)
	Added the AddControl method, used by PageParserFilter when a
	custom filter wants to inject a control in the current control
	builder tree.

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

	* 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.

svn path=/trunk/mcs/; revision=126855
2009-02-13 20:11:19 +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
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 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 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 4944213e17 2008-06-30 Marek Habersack <[email protected]>
* AspGenerator.cs: hush the warnings and fix invalid type
	comparison.

	* AssemblyBuilder.cs: hush the warnings and add some debugging
	CWLs.

	* AspParser.cs, AppResourcesCompiler.cs, TemplateBuildProvider.cs,
	CachingCompiler.cs, BaseCompiler.cs, TemplateControlCompiler.cs,
	SimpleBuildProvider.cs, BuildManager.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* HtmlForm.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* ObjectDataSourceView.cs, Menu.cs, DataList.cs,
	CustomValidator.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* MachineKeyRegistryStorage.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* SqliteMembershipProvider.cs, SqliteRoleProvider.cs: remove
	unused method

	* SqlRoleProvider.cs, AspNetDBSchemaChecker.cs: hush the warnings

2008-06-30  Marek Habersack  <[email protected]>

	* 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: Hush the warnings.

2008-06-30  Marek Habersack  <[email protected]>

	* HttpRuntime.cs, HttpApplication.cs: hush the warnings

	* HttpContext.cs: Hush the warnings.

2008-06-30  Marek Habersack  <[email protected]>

	* SqliteProfileProvider.cs: remove unused method

2008-06-30  Marek Habersack  <[email protected]>

	* CompilationSection.cs: hush the warnings



svn path=/trunk/mcs/; revision=106886
2008-06-30 13:20:58 +00:00
Juraj Skripsky a49df1366f 2008-06-04 Juraj Skrispky <[email protected]>
* PageParser.cs (ProcessMainAttributes): Take value of
	enableEventValidation from web.config into account. Fixes bug #397099.


svn path=/trunk/mcs/; revision=104877
2008-06-04 16:04:31 +00:00
Marek Habersack bf6db8d3c5 2008-04-24 Marek Habersack <[email protected]>
* AspComponentFoundry.cs: added a new GetComponentType overload
	which returns component source and a boolean flag whether the
	control was registered from web.config (2.0).

2008-04-24  Marek Habersack  <[email protected]>

	* 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.

svn path=/trunk/mcs/; revision=101623
2008-04-23 23:26:04 +00:00
Marek Habersack e71f514f40 2008-01-24 Marek Habersack <[email protected]>
* WebHandlerBuildProvider.cs: derive from the new
	SimpleBuildProvider class.

	* BuildManager.cs: full implementation of the batch compilation
	for the 2.0 profile. The implementation is most probably different
	to MS.NET's but the effects are the same (or nearly the same -
	there are some minor differences). There are missing bits and
	pieces, but minor ones - to be added later.

	* SimpleBuildProvider.cs: new build provider abstract class
	deriving from the GenericBuildProvider that implements common code
	for building web handlers and web services.

	* GenericBuildProvider.cs: new generic abstract class used to
	implement base builder code for all the build provider types and
	maximize code reuse.

	* PageBuildProvider.cs: derive from the new TemplateBuildProvider
	class and implement all the necessary abstract members. 
	Handle "fake" virtual paths, to properly support generating of the
	WSDL helper code.

	* BuildProvider.cs: SetVirtualPath now converts the passed path to
	absolute URL.
	Added internal virtual method GenerateCode, used by derived
	classes.
	SetCommonParameters no longer sets the referenced assemblies, this
	is done in BuildManager now.
	Added an internal virtual property CodeUnit which returns the
	build provider's compilation unit.

	* PageCompiler.cs: fix assignment of base types for asynchronous
	pages, to match MS.NET.
	For asynchronous pages, add the necessary methods generation.

	* BaseCompiler.cs: default namespace is now set using a constant.
	Renamed the Init method into ConstructType, to better reflect its
	purpose and made the method internal - it is used by the build
	providers.
	Added several CreateProvider overloads for easier and more unified
	compilation provider creation.
	Added an internal MainClassType property to enable class type name
	retrieval from other parts of the class hierarchy.

	* ApplicationFileBuildProvider.cs: new build provider deriving
	from the TemplateBuildProvider class to compile the global.asax
	file.

	* AspGenerator.cs: properly handle parsers which have no input
	file path given, but use TextReader instead.
	Dependencies are virtual paths now, convert them to physical ones
	before creating cache dependency.

	* CachingCompiler.cs: parser dependencies are virtual paths now,
	convert them to physical ones before creating cache dependency.

	* AssemblyBuilder.cs: full implementation of the documented
	functionality as well as a lot of internal build code
	added. Produces assemblies using the same style what MS.NET for
	temporary and target file naming. Handles partial type squashing
	if the same partial type is used by several code compile units
	added to the same builder instance.

	* MasterPageBuildProvider.cs: use the new TemplateBuildProvider
	base class and add implementation of all the abstract methods
	required by it.

	* ThemeDirectoryBuildProvider.cs: new build provider to compile
	theme directories. Replaces the old ThemeDirectoryCompiler class.

	* UserControlBuildProvider.cs: use the new TemplateBuildProvider
	base class and add implementation of all the abstract methods
	required by it.

	* TemplateBuildProvider.cs: new internal abstract class which
	implements the common tasks for all the template control build
	providers.

	* WebServiceBuildProvider.cs: use the new SimpleBuildProvider base
	type to implement building.

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

	* 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-24  Marek Habersack  <[email protected]>

	* HttpApplicationFactory.cs: use BuildManager.GetCompiledType to
	build the application (global.asax) file.

svn path=/trunk/mcs/; revision=93848
2008-01-24 21:55:44 +00:00
Marek Habersack de1ad2116e 2007-12-15 Marek Habersack <[email protected]>
* 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-15  Marek Habersack  <[email protected]>

	* AppCodeCompiler.cs: do not instantiate CodeDomProvider twice.

	* BaseCompiler.cs: do not use CreateCompiler () in the 2.0
	profile, it's obsoleted. CachingCompiler will use the
	CodeDomProvider methods directly in that case.

	* WebServiceCompiler.cs: Updated GetCompiledType to acquire
	compiler information for the 2.0 profile from system.codeDom.

	* CachingCompiler.cs: the Compile overloads do not use the
	compiler instance, but call appropriate methods on the
	CodeDomProvider instance directly.
	Updated some Compile overloads to acquire compiler information for
	the 2.0 profile from system.codeDom.


svn path=/trunk/mcs/; revision=91343
2007-12-15 03:42:00 +00:00
Igor Zelmanovich f8dac948dc 2007-11-07 Igor Zelmanovich <[email protected]>
* TraceContext.cs:
	* TraceData.cs: implemented TraceMode feature.	

2007-11-07 Igor Zelmanovich <[email protected]>

	* PageParser.cs: fixed initial value of tracemode.


svn path=/trunk/mcs/; revision=89102
2007-11-07 13:55:05 +00:00
Marek Habersack cc4155bff0 2007-10-29 Marek Habersack <[email protected]>
* 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.

svn path=/trunk/mcs/; revision=88403
2007-10-29 19:23:20 +00:00
Marek Habersack 96c7b2864d 2007-10-17 Marek Habersack <[email protected]>
* TemplateParser.cs: removed code that ignored the Async and
	AsyncTimeout attributes.

	* PageParser.cs: handle the Async and AsyncTimeout attributes
	here. Fixes bug #325450
2007-10-17  Marek Habersack  <[email protected]>

	* PageCompiler.cs: added code to set the AsyncMode and
	AsyncTimeout Page properties.

svn path=/trunk/mcs/; revision=87714
2007-10-17 21:17:41 +00:00
Gert Driesen b857f8cee5 * PagesConfigurationHandler.cs: Use enum for EnableSessionState.
* PagesConfiguration.cs: Use enum for EnableSessionState.
* PagesEnableSessionState.cs: Marked internal on 1.0 profile.
* PageParser.cs: Replace enableSessionState and readOnlySessionState
bools with enum backed field. Move 1.0 profile code for checking value
of EnableSessionState pages config to PagesConfigurationHandler.       
Fixes bug #82392 for 1.0 profile.

svn path=/trunk/mcs/; revision=83810
2007-08-10 12:43:23 +00:00
Marek Habersack 36382adfe5 2007-08-09 Marek Habersack <[email protected]>
* PageParser.cs: honor web.config enableSessionState
	ReadOnly setting instead of overwriting based on default value for 
	page directive EnableSessionState. Patch from Joel Reed
	<[email protected]>, thanks! Fixes bug #82392

svn path=/trunk/mcs/; revision=83807
2007-08-10 10:32:25 +00:00
Marek Habersack 324a2ea444 2007-05-24 Marek Habersack <[email protected]>
* PageParser.cs: added support for the PreviousPageType
	directive.

2007-05-24  Marek Habersack  <[email protected]>

	* PageCompiler.cs: added support for the PreviousPageType directive.

	* Directive.cs: as above.


svn path=/trunk/mcs/; revision=77907
2007-05-24 12:55:14 +00:00
Marek Habersack 8f217b10af 2007-05-01 Marek Habersack <[email protected]>
* HttpCapabilitiesBase.cs: move the User-Agent code to a separate
	internal method.

2007-05-01  Marek Habersack  <[email protected]>

	* HtmlForm.cs: do not use User-Agent directly, we must take
	ClientTarget into account.

2007-05-01  Marek Habersack  <[email protected]>

	* BaseValidator.cs: do not use User-Agent directly, we must take
	ClientTarget into account.

2007-05-01  Marek Habersack  <[email protected]>

	* PageParser.cs: clientTarget comparisons must be case-insensitive


svn path=/trunk/mcs/; revision=76522
2007-05-01 11:01:22 +00:00
Marek Habersack b261b168d2 ignore case and use invariant culture on comparison
svn path=/trunk/mcs/; revision=75477
2007-04-06 10:42:49 +00:00
Marek Habersack 88c1522436 adjust for the 1.x profile
svn path=/trunk/mcs/; revision=75476
2007-04-06 10:38:27 +00:00
Marek Habersack b723df471e 2007-04-06 Marek Habersack <[email protected]>
* PagesSection.cs: provide appropriate default value for the
	asyncTimeout setting.

2007-04-06  Marek Habersack  <[email protected]>

	* Page.cs: defaults for ViewStateEncrptionMode and AsyncTimeout
	are read from the pages section, if found.

	* TemplateControlParser.cs: added support for loading
	pages/controls defaults from web.config even if the page/control
	does not have its corresponding directive.
	Added support for reading the CompilationMode attribute.

	* PageParser.cs: added support for loading pages/controls defaults
	as above. Fixes bug #80915.
	Added support for reading the maxPageStateFieldLength setting.
	Added support for reading the pageParserFilter setting.
	

svn path=/trunk/mcs/; revision=75475
2007-04-06 10:29:38 +00:00
Marek Habersack 0f6913f8a5 Make the enableSesionState <pages> attribute values case-sensitive. Fixes bug 80913
svn path=/trunk/mcs/; revision=73770
2007-03-06 00:40:11 +00:00
Marek Habersack fb27421ce2 Support a few more Page directive attributes
svn path=/trunk/mcs/; revision=73660
2007-03-03 15:26:40 +00:00
Marek Habersack 630edf9eff Support for automatic culture detection
svn path=/trunk/mcs/; revision=68216
2006-11-20 21:02:22 +00:00
Gonzalo Paniagua Javier aeae1b7019 2006-09-18 Gonzalo Paniagua Javier <[email protected]>
* System.Web.UI/PageParser.cs:
	* System.Web.Compilation/PageCompiler.cs: support the
	EnableEventValidation attribute.


svn path=/trunk/mcs/; revision=65610
2006-09-18 21:42:21 +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
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 b5cb597758 2006-02-07 Chris Toshok <[email protected]>
* MasterPage.cs (CreateMasterPage): don't nullref on null
	contentTemplateCollection.

	* ControlBuilder.cs: add a flushOutputStatements field.

	* PageParser.cs (ProcessMainAttributes): handle Title attribute.
	(Title): add getter.
	
	* Page.cs (Title): implement getter/setter.
	(InternalProcessRequest): after calling ApplyMasterPage, apply the
	page's Title directive if there is one.
	(AddContentTemplate): make the EditorBrowsable attribute apply to
	the method, not the field.


svn path=/trunk/mcs/; revision=56634
2006-02-07 20:04:15 +00:00
Chris Toshok 6550ae7c10 2006-02-01 Chris Toshok <[email protected]>
* TemplateParser.cs: CONFIGURATION_2_0 => NET_2_0, and replace
	calls to GetWebApplicationSection with GetSection.

	* SimpleWebHandlerParser.cs: same.

	* Page.cs: same.

	* PageParser.cs: same.

	* BaseParser.cs: same.


svn path=/trunk/mcs/; revision=56415
2006-02-01 20:00:39 +00:00
Chris Toshok ef9c382df3 2006-01-22 Chris Toshok <[email protected]>
* PageParser.cs (ProcessMainAttributes): i missed a
	CONFIGURATION_2_0 block.


svn path=/trunk/mcs/; revision=55911
2006-01-22 20:05:32 +00:00
Chris Toshok 2fd12039bd 2005-11-28 Chris Toshok <[email protected]>
* Page.cs (GetFormatter): CONFIGURATION_2_0 work.

	* TemplateParser.cs (..ctor): CONFIGURATION_2_0 work.
	(PagesConfig): add a CONFIGURATION_2_0 version that returns a
	PagesSection.

	* PageParser.cs (ProcessMainAttributes): CONFIGURATION_2_0 work.

	* BaseParser.cs (CompilationConfig): add a CONFIGURATION_2_0
	version that returns a CompilationSection.


svn path=/trunk/mcs/; revision=53582
2005-11-28 20:54:41 +00:00
Sebastien Pouliot d3e07dd1e4 2005-09-15 Sebastien Pouliot <[email protected]>
* Html32TextWriter.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level. Added new 2.0 properties
	(but the generated HTML doesn't use them).
	* HtmlTextWriter.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level.
	* ImageClickEventArgs.cs: Added LinkDemand for AspNetHostingPermission
	with Minimal level.
	* LiteralControl.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level. Default Text is null.
	* LosFormatter.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level. Stubbed new 2.0 ctor.
	* ObjectConverter.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level. Obsoleted ctor for 2.0.
	* ObjectTagBuilder.cs: Added LinkDemand for AspNetHostingPermission 
	with Minimal level. Added check for null id (HttpException).
	* Page.cs: Added LinkDemand and InheritanceDemand for 
	AspNetHostingPermission with Minimal level. Throw some HttpException 
	when no context is available.
	* Pair.cs: Added LinkDemand for AspNetHostingPermission with Minimal 
	level. InheritanceDemand too for 1.x.
	* PageParser.cs: Added LinkDemand for AspNetHostingPermission with 
	Minimal level.


svn path=/trunk/mcs/; revision=50093
2005-09-15 16:58:32 +00:00
Gonzalo Paniagua Javier 78b524222f 2005-06-14 Gonzalo Paniagua Javier <[email protected]>
* PageParser.cs: don't try to compile the master page if it wan't
	provided. Use MapPath from the base classes instead of the long
	version. Fixes bug #75269 that prevented xsp2 from working properly.


svn path=/trunk/mcs/; revision=46006
2005-06-15 03:16:20 +00:00