using System.Web.Compilation;
using System.Web.Configuration;
using System.Web.Util;
+using System.IO;
namespace System.Web.UI
{
#if NET_2_0
string masterPage;
Type masterType;
+ string title;
+ string theme;
+ string styleSheetTheme;
+ bool enable_event_validation;
#endif
public PageParser ()
AddApplicationAssembly ();
}
+#if NET_2_0
+ internal PageParser (string virtualPath, TextReader reader, HttpContext context)
+ {
+ Context = context;
+ BaseVirtualDir = UrlUtils.GetDirectory (virtualPath);
+ Reader = reader;
+ SetBaseType (PagesConfig.PageBaseType);
+ AddApplicationAssembly ();
+ }
+#endif
+
public static IHttpHandler GetCompiledPageInstance (string virtualPath,
string inputFile,
HttpContext context)
IHttpHandler h = (IHttpHandler) pp.GetCompiledInstance ();
return h;
}
-
+
internal override void ProcessMainAttributes (Hashtable atts)
{
string enabless = GetString (atts, "EnableSessionState",
CultureInfo ci = null;
try {
- ci = new CultureInfo (culture);
+#if NET_2_0
+ if (!culture.StartsWith ("auto"))
+#endif
+ ci = new CultureInfo (culture);
} catch {
ThrowParseException ("Unsupported Culture: " + culture);
}
- if (ci.IsNeutralCulture) {
+ if (ci != null && ci.IsNeutralCulture) {
string suggestedCulture = SuggestCulture (culture);
string fmt = "Culture attribute must be set to a non-neutral Culture.";
if (suggestedCulture != null)
if (uiculture != null) {
CultureInfo ci = null;
try {
- ci = new CultureInfo (uiculture);
+#if NET_2_0
+ if (!uiculture.StartsWith ("auto"))
+#endif
+ ci = new CultureInfo (uiculture);
} catch {
ThrowParseException ("Unsupported Culture: " + uiculture);
}
- if (ci.IsNeutralCulture) {
+ if (ci != null && ci.IsNeutralCulture) {
string suggestedCulture = SuggestCulture (uiculture);
string fmt = "UICulture attribute must be set to a non-neutral Culture.";
if (suggestedCulture != null)
// Make sure the page exists
if (masterPage != null)
MasterPageParser.GetCompiledMasterType (masterPage, MapPath (masterPage), HttpContext.Current);
+
+ title = GetString(atts, "Title", null);
+
+ theme = GetString (atts, "Theme", null);
+ styleSheetTheme = GetString (atts, "StyleSheetTheme", null);
+ enable_event_validation = GetBool (atts, "EnableEventValidation", true);
#endif
// Ignored by now
GetString (atts, "EnableViewStateMac", null);
}
#if NET_2_0
+ internal string Theme {
+ get { return theme; }
+ }
+
+ internal string StyleSheetTheme {
+ get { return styleSheetTheme; }
+ }
+
internal string MasterPageFile {
get { return masterPage; }
}
internal Type MasterType {
get { return masterType; }
}
+
+ internal string Title {
+ get { return title; }
+ }
+
+ internal bool EnableEventValidation {
+ get { return enable_event_validation; }
+ }
#endif
}
}