projects
/
mono.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New tests.
[mono.git]
/
mcs
/
class
/
System.Web
/
System.Web.UI.HtmlControls
/
HtmlSelectBuilder.cs
diff --git
a/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelectBuilder.cs
b/mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelectBuilder.cs
index a9264201976582aca1e98f160c7bcfda8397692d..b4c8e726e07f85eb40913c74c18955d985f2fa3b 100644
(file)
--- a/
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelectBuilder.cs
+++ b/
mcs/class/System.Web/System.Web.UI.HtmlControls/HtmlSelectBuilder.cs
@@
-5,7
+5,7
@@
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2003 Ximian, Inc (http://www.ximian.com)
// Gonzalo Paniagua Javier (gonzalo@ximian.com)
//
// (C) 2003 Ximian, Inc (http://www.ximian.com)
-// Copyright (C) 2005 Novell, Inc (http://www.novell.com)
+// Copyright (C) 2005
-2010
Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
@@
-30,16
+30,15
@@
using System.Collections;
using System.Security.Permissions;
using System.Web.UI.WebControls;
using System.Collections;
using System.Security.Permissions;
using System.Web.UI.WebControls;
+using System.Globalization;
+using System.Web.Util;
namespace System.Web.UI.HtmlControls
{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
namespace System.Web.UI.HtmlControls
{
// CAS
[AspNetHostingPermission (SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission (SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
-#if NET_2_0
- public
-#endif
- class HtmlSelectBuilder : ControlBuilder
+ public class HtmlSelectBuilder : ControlBuilder
{
public override bool AllowWhitespaceLiterals ()
{
{
public override bool AllowWhitespaceLiterals ()
{
@@
-48,9
+47,12
@@
namespace System.Web.UI.HtmlControls
public override Type GetChildControlType (string tagName, IDictionary attribs)
{
public override Type GetChildControlType (string tagName, IDictionary attribs)
{
- if (S
ystem.String.Compare (tagName, "option", tru
e) != 0)
+ if (S
tring.Compare (tagName, "option", true, Helpers.InvariantCultur
e) != 0)
return null;
return null;
+ string selected = attribs ["selected"] as string;
+ if (selected != null && selected.Length > 0 && String.Compare (selected, "selected", true, Helpers.InvariantCulture) == 0)
+ attribs ["selected"] = "true";
return typeof (ListItem);
}
}
return typeof (ListItem);
}
}