mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* DynamicValidator.cs: initial implementation * DynamicDataManager.cs: implemented OnLoad. Better implementation of RegisterControl * DynamicDataExtensions.cs: implemented FindDataSourceControl. 2009-10-02 Marek Habersack <[email protected]> * DynamicValidatorTest.cs: added. 2009-10-02 Marek Habersack <[email protected]> * GridView.cs: added two 3.5 properties - SelectedPersistedDataKey and IPersistedSelector.DataKey. * BaseDataBoundControl.cs: slight optimizations to FindDataSource svn path=/trunk/mcs/; revision=143278
33 lines
882 B
C#
33 lines
882 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
using MonoTests.DataObjects;
|
|
using MonoTests.Common;
|
|
using MonoTests.SystemWeb.Framework;
|
|
using MonoTests.DataSource;
|
|
|
|
public partial class DynamicValidator_02 : TestsBasePage <TestDataContext4>
|
|
{
|
|
protected override void PopulateDataSource (DynamicDataSource ds)
|
|
{
|
|
var container = ds.DataContainerInstance as TestDataContainer<TestDataContext4>;
|
|
if (container == null)
|
|
return;
|
|
|
|
List<BazValidationAttributes> foo = container.ContainedTypeInstance.BazValidationAttributes;
|
|
foo.Add (new BazValidationAttributes {
|
|
Column1 = 0
|
|
});
|
|
}
|
|
|
|
protected void Page_Init (object sender, EventArgs e)
|
|
{
|
|
InitializeDataSource (DynamicDataSource1, "BazValidationAttributesTable");
|
|
DynamicDataManager1.RegisterControl (ListView1);
|
|
}
|
|
}
|