Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,118 @@
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Tests
{
public class CustomCheckBoxColumn : CheckBoxField
{
string caseId;
public CustomCheckBoxColumn (string id)
{
this.caseId = id;
}
protected override void InitializeDataCell(DataControlFieldCell cell, DataControlRowState rowState)
{
switch (caseId) {
default:
case "0":
Case0 (cell);
break;
case "1":
Case1 (cell);
break;
case "2":
Case2 (cell);
break;
case "3":
Case3 (cell);
break;
case "4":
Case4 (cell);
break;
case "5":
Case5 (cell);
break;
case "6":
Case6 (cell);
break;
case "7":
Case7 (cell);
break;
}
}
void Case0 (DataControlFieldCell cell)
{
CheckBox checkBox = new CheckBox();
checkBox.ToolTip = "Dummy";
cell.Controls.Add(checkBox);
checkBox.DataBinding += OnDataBindField;
}
void Case1 (DataControlFieldCell cell)
{
ListBox lb = new ListBox ();
cell.Controls.Add(lb);
Case0 (cell);
}
void Case2 (DataControlFieldCell cell)
{
cell.Controls.Add(new CheckBox ());
Case0 (cell);
cell.Controls.Add(new CheckBox ());
}
void Case3 (DataControlFieldCell cell)
{
Content content = new Content ();
CheckBox checkBox = new CheckBox();
checkBox.ToolTip = "Dummy";
content.Controls.Add(checkBox);
checkBox.DataBinding += OnDataBindField;
cell.Controls.Add (content);
}
void Case4 (DataControlFieldCell cell)
{
CheckBox checkBox = new CheckBox();
checkBox.ToolTip = "Dummy";
cell.Controls.Add(checkBox);
ListBox lb = new ListBox ();
lb.DataBinding += OnDataBindField;
cell.Controls.Add(lb);
}
void Case5 (DataControlFieldCell cell)
{
cell.Controls.Add (new ListBox ());
}
void Case6 (DataControlFieldCell cell)
{
cell.Controls.Add (new ListBox ());
cell.Controls.Add (new CheckBox ());
}
void Case7 (DataControlFieldCell cell)
{
cell.Controls.Add (new CheckBox ());
cell.Controls.Add (new ListBox ());
}
}
}

View File

@@ -0,0 +1,43 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Web;
using System.Web.UI.WebControls;
namespace MonoTests.Controls
{
[Flags]
public enum EnumConverterTestValues
{
FlagOne = 0x01,
FlagTwo = 0x02
}
public class EnumConverterTestValuesConverter : EnumConverter
{
public EnumConverterTestValuesConverter (Type type)
: base (type)
{ }
}
public class EnumConverterTextBox : TextBox
{
EnumConverterTestValues values;
[TypeConverter (typeof (EnumConverterTestValuesConverter))]
public EnumConverterTestValues Values {
get { return values; }
set { values = value; }
}
public EnumConverterTextBox ()
{
}
protected override void OnInit (EventArgs e)
{
base.OnInit (e);
Text = values.ToString ();
}
}
}

View File

@@ -0,0 +1,36 @@
// Bug #594238
using System;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace TestNamedHolders
{
public class MyContainer : WebControl, INamingContainer
{
Control whereTheChildrenPlay;
// can't do this if it is an INamingContainer
public override ControlCollection Controls
{
get { return whereTheChildrenPlay.Controls; }
}
public MyContainer()
{
whereTheChildrenPlay = new Content();
whereTheChildrenPlay.ID = "children";
}
protected override void OnLoad (EventArgs e)
{
base.OnLoad (e);
// would normally put other stuff here
base.Controls.Add(whereTheChildrenPlay);
// and possibly here
}
}
}

View File

@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AdvancedParameters" xml:space="preserve">
<value>Paramètres avancés</value>
</data>
<data name="Anonymous" xml:space="preserve">
<value>Anonyme</value>
</data>
<data name="Authorizations" xml:space="preserve">
<value>Autorisations</value>
</data>
<data name="Cache" xml:space="preserve">
<value>Cache</value>
</data>
<data name="Close" xml:space="preserve">
<value>Fermer</value>
</data>
<data name="Display" xml:space="preserve">
<value>Affichage</value>
</data>
<data name="General" xml:space="preserve">
<value>Général</value>
</data>
<data name="Home" xml:space="preserve">
<value>Accueil</value>
</data>
<data name="Loading" xml:space="preserve">
<value>Chargement...</value>
</data>
<data name="Password" xml:space="preserve">
<value>Mot de passe</value>
</data>
<data name="Preferences" xml:space="preserve">
<value>Préférences</value>
</data>
<data name="Reload" xml:space="preserve">
<value>Recharger</value>
</data>
<data name="Save" xml:space="preserve">
<value>Enregistrer</value>
</data>
<data name="User" xml:space="preserve">
<value>Utilisateur</value>
</data>
<data name="Users" xml:space="preserve">
<value>Utilisateurs</value>
</data>
</root>

View File

@@ -0,0 +1,165 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AdvancedParameters" xml:space="preserve">
<value>Advanced parameters</value>
</data>
<data name="Anonymous" xml:space="preserve">
<value>Anonymous</value>
</data>
<data name="Authorizations" xml:space="preserve">
<value>Authorizations</value>
</data>
<data name="Cache" xml:space="preserve">
<value>Cache</value>
</data>
<data name="Close" xml:space="preserve">
<value>Close</value>
</data>
<data name="Display" xml:space="preserve">
<value>Display</value>
</data>
<data name="General" xml:space="preserve">
<value>Général</value>
</data>
<data name="Home" xml:space="preserve">
<value>Home</value>
</data>
<data name="Loading" xml:space="preserve">
<value>Loading...</value>
</data>
<data name="Password" xml:space="preserve">
<value>Password</value>
</data>
<data name="Preferences" xml:space="preserve">
<value>Preferences</value>
</data>
<data name="Reload" xml:space="preserve">
<value>Reload</value>
</data>
<data name="Save" xml:space="preserve">
<value>Save</value>
</data>
<data name="User" xml:space="preserve">
<value>User</value>
</data>
<data name="Users" xml:space="preserve">
<value>Users</value>
</data>
</root>

View File

@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="TestString" xml:space="preserve">
<value>Test</value>
</data>
</root>

View File

@@ -0,0 +1,16 @@
<%@ Page Language="C#" AutoEventWireup="true" Async="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -0,0 +1,21 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BoundField_Bug646505.aspx.cs" Inherits="MonoBoundFieldCompatibilityIssue._Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView runat="server" ID="gridView"
OnInit="OnGridViewInit"
AutoGenerateColumns="False"
AutoGenerateEditButton="True"
OnRowUpdating="OnGridViewEditCancelling"
OnRowCancelingEdit="OnGridViewEditCancelling"
OnRowEditing="OnGridViewRowEditing" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,59 @@
using System;
using System.Web.UI.WebControls;
namespace MonoBoundFieldCompatibilityIssue
{
public partial class _Default : System.Web.UI.Page
{
#region [ -- Custom Column Definition -- ]
/// <summary>
/// Custom Column for the GridView
/// </summary>
class CustomColumn : BoundField
{
protected override void InitializeDataCell (DataControlFieldCell cell, DataControlRowState rowState)
{
if ((rowState & DataControlRowState.Edit) != DataControlRowState.Normal) {
TextBox textBox = new TextBox ();
cell.Controls.Add (textBox);
textBox.DataBinding += OnDataBindField;
} else
base.InitializeDataCell (cell, rowState);
}
}
#endregion
protected void Page_Load (object sender, EventArgs e)
{
if (IsPostBack) return;
BindGridView ();
}
protected void OnGridViewInit (object sender, EventArgs e)
{
CustomColumn column = new CustomColumn ();
column.DataField = BoundField.ThisExpression;
gridView.Columns.Add (column);
}
protected void OnGridViewRowEditing (object sender, GridViewEditEventArgs e)
{
gridView.EditIndex = e.NewEditIndex;
BindGridView ();
}
protected void OnGridViewEditCancelling (object sender, EventArgs e)
{
gridView.EditIndex = -1;
BindGridView ();
}
private void BindGridView ()
{
gridView.DataSource = new bool [2];
gridView.DataBind ();
}
}
}

View File

@@ -0,0 +1,10 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Bug #325489 part 1</title></head>
<body>
<form id="form1" runat="server">
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:Button id="button1" runat="server" backcolor="#316AC5" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</form>
</body>
</html>

View File

@@ -0,0 +1,104 @@
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Implements Interface="System.Web.UI.ICallbackEventHandler" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server" >
protected System.Collections.Specialized.ListDictionary catalog;
protected String returnValue;
public bool raiseCallbackEvent;
public bool getCallbackResult;
protected void Page_Load (object sender, EventArgs e)
{
String cbReference =
Page.ClientScript.GetCallbackEventReference (this,
"arg", "ReceiveServerData", "context", null, false);
String callbackScript;
callbackScript = "function CallServer(arg, context)" +
"{ " + cbReference + ";}";
Page.ClientScript.RegisterClientScriptBlock (this.GetType (),
"CallServer", callbackScript, true);
catalog = new System.Collections.Specialized.ListDictionary ();
catalog.Add ("monitor", 12);
catalog.Add ("laptop", 10);
catalog.Add ("keyboard", 23);
catalog.Add ("mouse", 17);
ListBox1.DataSource = catalog;
ListBox1.DataTextField = "key";
ListBox1.DataBind ();
}
protected override void OnPreInit (EventArgs e)
{
MonoTests.SystemWeb.Framework.WebTest t = MonoTests.SystemWeb.Framework.WebTest.CurrentTest;
if (t != null)
t.Invoke (this);
base.OnPreInit (e);
}
void System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent (String eventArgument)
{
raiseCallbackEvent = true;
if (catalog[eventArgument] == null) {
returnValue = "-1";
}
else {
returnValue = catalog[eventArgument].ToString ();
}
}
String System.Web.UI.ICallbackEventHandler.GetCallbackResult ()
{
getCallbackResult = true;
if (getCallbackResult == true)
returnValue += "|true";
else
returnValue += "|false";
if (raiseCallbackEvent == true)
returnValue += "|true";
else
returnValue += "|false";
return returnValue;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head id="Head1" runat="server">
<title>Client Callback Example</title>
<script type="text/ecmascript">
function LookUpStock()
{
var lb = document.getElementById("ListBox1");
var product = lb.options[lb.selectedIndex].text;
CallServer(product, "");
}
function ReceiveServerData(rValue)
{
document.getElementById("ResultsSpan").innerHTML = rValue;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ListBox ID="ListBox1" Runat="server"></asp:ListBox>
<br />
<br />
<button type="Button" onclick="LookUpStock()">Look Up Stock</button>
<br />
<br />
Items in stock: <span id="ResultsSpan" runat="server"></span>
<br />
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,109 @@
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Implements Interface="System.Web.UI.ICallbackEventHandler" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server" >
protected String returnValue;
protected void Page_Load (object sender, EventArgs e)
{
String cbReference =
Page.ClientScript.GetCallbackEventReference (this,
"arg", "ReceiveServerData", "context", null, false);
String callbackScript;
callbackScript = "function CallServer(arg, context)" +
"{ " + cbReference + ";}";
Page.ClientScript.RegisterClientScriptBlock (this.GetType (),
"CallServer", callbackScript, true);
returnValue += "|Load";
}
protected override void OnPreInit (EventArgs e)
{
MonoTests.SystemWeb.Framework.WebTest t = MonoTests.SystemWeb.Framework.WebTest.CurrentTest;
if (t != null)
t.Invoke (this);
returnValue += "|PreInit";
base.OnPreInit (e);
}
protected override void OnInit (EventArgs e)
{
returnValue += "|Init";
base.OnInit (e);
}
protected override void OnInitComplete (EventArgs e)
{
returnValue += "|InitComplete";
base.OnInitComplete (e);
}
protected override void OnLoadComplete (EventArgs e)
{
returnValue += "|LoadComplete";
base.OnLoadComplete (e);
}
protected override void OnPreLoad (EventArgs e)
{
returnValue += "|PreLoad";
base.OnPreLoad (e);
}
protected override void OnPreRender (EventArgs e)
{
returnValue += "|PreRender";
base.OnPreRender (e);
}
protected override void OnUnload (EventArgs e)
{
returnValue += "|Unload";
base.OnUnload (e);
}
protected override void OnSaveStateComplete (EventArgs e)
{
returnValue += "|SaveStateComplete";
base.OnSaveStateComplete (e);
}
void System.Web.UI.ICallbackEventHandler.RaiseCallbackEvent (String eventArgument)
{
returnValue += "|RaiseCallbackEvent";
}
String System.Web.UI.ICallbackEventHandler.GetCallbackResult ()
{
returnValue += "|GetCallbackResult";
return returnValue;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head id="Head1" runat="server">
<title>Client Callback Example</title>
<script type="text/ecmascript">
function LookUpStock()
{
CallServer("" , "");
}
function ReceiveServerData(rValue)
{
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,27 @@
<%@ Page Language="C#" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<html><head><title>Change password</title></head>
<body>
<form runat="server">
Test: <asp:Label runat="server" id="test"/><br/>
<asp:ChangePassword ID="ChangePassword1" runat="server">
<ChangePasswordTemplate>
<table>
<tr>
<td>
<asp:TextBox runat="server" id="CurrentPassword" TextMode="Password"/>
<asp:RequiredFieldValidator runat="server" id="text1required" ControlToValidate="CurrentPassword"/>
</td>
</tr>
<tr>
<td>
<asp:TextBox runat="server" id="NewPassword" TextMode="Password"/>
<asp:RequiredFieldValidator runat="server" id="text2required" ControlToValidate="NewPassword"/>
</td>
</tr>
</table>
</ChangePasswordTemplate>
</asp:ChangePassword>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<%@ Import Namespace="Tests" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
bool[] ba = new bool [3];
ba [0] = true;
gridView.DataSource = ba;
gridView.DataBind();
}
protected void OnGridViewInit(object sender, EventArgs e)
{
CustomCheckBoxColumn column = new CustomCheckBoxColumn("0");
column.DataField = "!";
gridView.Columns.Add(column);
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" method="GET" runat="server">
<div>
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView runat="server" ID="gridView" OnInit="OnGridViewInit" AutoGenerateColumns="False" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<%@ Import Namespace="Tests" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
bool[] ba = new bool [3];
ba [0] = true;
gridView.DataSource = ba;
gridView.DataBind();
}
protected void OnGridViewInit(object sender, EventArgs e)
{
CustomCheckBoxColumn column = new CustomCheckBoxColumn("1");
column.DataField = "!";
gridView.Columns.Add(column);
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" method="GET" runat="server">
<div>
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView runat="server" ID="gridView" OnInit="OnGridViewInit" AutoGenerateColumns="False" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<%@ Import Namespace="Tests" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
bool[] ba = new bool [3];
ba [0] = true;
gridView.DataSource = ba;
gridView.DataBind();
}
protected void OnGridViewInit(object sender, EventArgs e)
{
CustomCheckBoxColumn column = new CustomCheckBoxColumn("2");
column.DataField = "!";
gridView.Columns.Add(column);
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" method="GET" runat="server">
<div>
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView runat="server" ID="gridView" OnInit="OnGridViewInit" AutoGenerateColumns="False" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<%@ Import Namespace="Tests" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
bool[] ba = new bool [3];
ba [0] = true;
gridView.DataSource = ba;
gridView.DataBind();
}
protected void OnGridViewInit(object sender, EventArgs e)
{
CustomCheckBoxColumn column = new CustomCheckBoxColumn("5");
column.DataField = "!";
gridView.Columns.Add(column);
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" method="GET" runat="server">
<div>
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView runat="server" ID="gridView" OnInit="OnGridViewInit" AutoGenerateColumns="False" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<%@ Import Namespace="Tests" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
bool[] ba = new bool [3];
ba [0] = true;
gridView.DataSource = ba;
gridView.DataBind();
}
protected void OnGridViewInit(object sender, EventArgs e)
{
CustomCheckBoxColumn column = new CustomCheckBoxColumn("6");
column.DataField = "!";
gridView.Columns.Add(column);
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" method="GET" runat="server">
<div>
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView runat="server" ID="gridView" OnInit="OnGridViewInit" AutoGenerateColumns="False" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</div>
</form>
</body>
</html>

View File

@@ -0,0 +1,35 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyPage.aspx.cs" Inherits="MyPage" %>
<%@ Import Namespace="Tests" %>
<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
bool[] ba = new bool [3];
ba [0] = true;
gridView.DataSource = ba;
gridView.DataBind();
}
protected void OnGridViewInit(object sender, EventArgs e)
{
CustomCheckBoxColumn column = new CustomCheckBoxColumn("7");
column.DataField = "!";
gridView.Columns.Add(column);
}
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" method="GET" runat="server">
<div>
<%= MonoTests.stand_alone.WebHarness.HtmlDiff.BEGIN_TAG %><asp:GridView runat="server" ID="gridView" OnInit="OnGridViewInit" AutoGenerateColumns="False" /><%= MonoTests.stand_alone.WebHarness.HtmlDiff.END_TAG %>
</div>
</form>
</body>
</html>

Some files were not shown because too many files have changed in this diff Show More