Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel de Icaza <miguel@gnome.org>2001-11-05 10:10:08 +0300
committerMiguel de Icaza <miguel@gnome.org>2001-11-05 10:10:08 +0300
commit7c9ee1a3eee8ba8eda6fc266f2936d3930d40248 (patch)
treee74daf17f9abd8c479280e02683ecf8c3e004439 /mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
parent7eb2c92598dd09f9600ac131c3a677500315d7a7 (diff)
Flush pending changes I got from a contributor that did not put his name in
svn path=/trunk/mcs/; revision=1263
Diffstat (limited to 'mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs')
-rw-r--r--mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs42
1 files changed, 15 insertions, 27 deletions
diff --git a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
index 02997962128..bd319d61b54 100644
--- a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
+++ b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlAnchor.cs
@@ -9,33 +9,30 @@ using System.Web.UI;
namespace System.Web.UI.HtmlControls{
- public class HtmlAnchor : HtmlContainerControl, IPostBackDataHandler{
+ public class HtmlAnchor : HtmlContainerControl, IPostBackEventHandler{
- private static readonly object EventServerChange;
+ private static readonly object EventServerClick;
public HtmlAnchor(): base("a"){}
protected virtual void OnServerClick(EventArgs e){
EventHandler handler;
handler = (EventHandler) Events[EventServerClick];
- if(handler != null){
- handler.Invoke(this, e);
- }
+ if(handler != null) handler.Invoke(this, e);
}
- protected override void RenderAttributes(HtmlTextWriter writer);{
- if ((EventHandler) Events[EventServerClick] != null){
+ protected new void RenderAttributes(HtmlTextWriter writer){
+ if ( (EventHandler) Events[EventServerClick] != null){
Attributes.Remove("href");
RenderAttributes(writer);
writer.WriteAttribute(Page.GetPostBackClientHyperlink(this,""),"href");
}
else{
- PreProcessRelativeReferenceAttribute(writer,"href");
+ PreProcessRelativeReference(writer,"href");
RenderAttributes(writer);
}
}
- //FIXME: not sure about the accessor
public void RaisePostBackEvent(string eventArgument){
OnServerClick(EventArgs.Empty);
}
@@ -49,56 +46,47 @@ namespace System.Web.UI.HtmlControls{
}
}
- public int HRef{
+ public string HRef{
get{
string attr = Attributes["href"];
- if (attr != null){
- return attr;
- }
+ if (attr != null) return attr;
return "";
}
set{
- //MapIntegerAttributeToString(value) accessible constraint is "assembly"
- Attributes["href"] = MapIntegerAttributeToString(value);
+ Attributes["href"] = AttributeToString(value);
}
}
public string Name{
get{
string attr = Attributes["name"];
- if (attr != null){
- return attr;
- }
+ if (attr != null) return attr;
return "";
}
set{
- Attributes["name"] = MapStringAttributeToString(value);
+ Attributes["name"] = AttributeToString(value);
}
}
public string Target{
get{
string attr = Attributes["target"];
- if (attr != null){
- return attr;
- }
+ if (attr != null) return attr;
return "";
}
set{
- Attributes["target"] = MapStringAttributeToString(value);
+ Attributes["target"] = AttributeToString(value);
}
}
public string Title{
get{
string attr = Attributes["title"];
- if (attr != null){
- return attr;
- }
+ if (attr != null) return attr;
return "";
}
set{
- Attributes["title"] = MapStringAttributeToString(value);
+ Attributes["title"] = AttributeToString(value);
}
}