Sfoglia il codice sorgente

2002-05-07 Duncan Mak <[email protected]>

	* HtmlSelect.cs (TrackViewState): Added 'new' keyword to avoid
	clashing with the method defined in the parent class.
	(OnDataBinding): Added missing casts.

	* HtmlForm.cs (Render): Fixed call too SetAttribute, need to cast
	'this' to IAttributeAccessor before calling interface method.
	Also renamed some calls to reflect changes in the API.

	* HtmlControl.cs (WriteOnClickAttribute): Made it not static and
	fixed a typo.

svn path=/trunk/mcs/; revision=4485
Duncan Mak 23 anni fa
parent
commit
9c19cc267c

+ 13 - 0
mcs/class/System.Web/System.Web.UI.HtmlControls/ChangeLog

@@ -1,3 +1,16 @@
+2002-05-07  Duncan Mak  <[email protected]>
+
+	* HtmlSelect.cs (TrackViewState): Added 'new' keyword to avoid
+	clashing with the method defined in the parent class.
+	(OnDataBinding): Added missing casts.
+
+	* HtmlForm.cs (Render): Fixed call too SetAttribute, need to cast
+	'this' to IAttributeAccessor before calling interface method.
+	Also renamed some calls to reflect changes in the API.
+
+	* HtmlControl.cs (WriteOnClickAttribute): Made it not static and
+	fixed a typo.
+
 2001-09-03  Leen Toelen  <[email protected]>
 
         * HtmlAnchor.cs: Initial implementation.

+ 3 - 3
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlControl.cs

@@ -70,7 +70,7 @@ namespace System.Web.UI.HtmlControls{
 			Attributes.Render(writer);
 		}
 		
-		internal static void WriteOnClickAttribute(HtmlTextWriter writer, bool submitsAutomatically, bool submitsProgramatically, bool causesValidation) {
+		internal void WriteOnClickAttribute(HtmlTextWriter writer, bool submitsAutomatically, bool submitsProgramatically, bool causesValidation) {
 			string local1;
 			string local2;
 			string local3;
@@ -79,11 +79,11 @@ namespace System.Web.UI.HtmlControls{
 			local1 = null;
 			if (submitsAutomatically) {
 				if ((causesValidation))
-					local1 = System.Web.UI.Utils.GetClientValidateEvent(Page);
+					local1 = System.Web.UI.Utils.GetClientValidatedEvent(Page);
 			}
 			else if (submitsProgramatically) {
 				if (causesValidation)
-					local1 = System.Web.UI.Utils.GetClientValidatedPostback(this);
+					local1 = System.Web.UI.Utils.GetClientValidatedPostBack(this);
 				else
 					local1 = Page.GetPostBackClientEvent(this, String.Empty);
 			}

+ 3 - 3
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlForm.cs

@@ -41,7 +41,7 @@ namespace System.Web.UI.HtmlControls{
 		//TODO: adapt code for non-IE browsers
 		protected override void Render(HtmlTextWriter output){
 			if (Page.SmartNavigation == true){
-				IAttributeAccessor.SetAttribute("_smartNavigation","true");
+				((IAttributeAccessor) this).SetAttribute("_smartNavigation","true");
 				HttpBrowserCapabilities browserCap = Context.Request.Browser;
 				if (browserCap.Browser.ToLower() != "ie" && browserCap.MajorVersion < 5){
 					base.Render(output);
@@ -79,9 +79,9 @@ namespace System.Web.UI.HtmlControls{
 						attr = attr.Substring(lastSlash + 1);
 				}
 				else{
-					attr = Util.UrlPath.MakeRelative(filePath,executionFilePath);
+					attr = System.Web.Utils.UrlUtils.MakeRelative(filePath,executionFilePath);
 				}
-				string queryString = Context.Request.QueryStringText;
+				string queryString = Context.Request.QueryStringRaw;
 				if (queryString != null && queryString.Length > 0)
 					attr = String.Concat(attr, '?', queryString);
 				return attr;

+ 3 - 3
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelect.cs

@@ -73,9 +73,9 @@ namespace System.Web.UI.HtmlControls{
 				while(current.MoveNext()){
 					if (valid == true){
 						if (text.Length >= 0)
-							li.Text = DataBinder.GetPropertyValue(current, text, null);
+							li.Text = DataBinder.GetPropertyValue(current, text) as string;
 						if (value.Length >= 0)
-							li.Value = DataBinder.GetPropertyValue(current, value, null);
+							li.Value = DataBinder.GetPropertyValue(current, value) as string;
 					}
 					else{
 						li.Value = li.Text = current.ToString();
@@ -210,7 +210,7 @@ namespace System.Web.UI.HtmlControls{
 		}
 		
 		//starts tracking changes to the viewstate
-		protected internal virtual void TrackViewState(){
+		internal virtual new void TrackViewState(){
 			TrackViewState();
 			Items.TrackViewState();
 		}