RuntimeControlsUserForm.aspx.cs
上传用户:husern
上传日期:2022-03-24
资源大小:534k
文件大小:2k
源码类别:

编辑器/阅读器

开发平台:

C#

  1. // -- FILE ------------------------------------------------------------------
  2. // name       : RuntimeControlsUserForm.cs
  3. // project    : Itenso Web User Forms
  4. // created    : Jani Giannoudis - 2008.10.30
  5. // language   : c#
  6. // environment: .NET 2.0
  7. // copyright  : (c) 2008 by Itenso GmbH, Switzerland
  8. // --------------------------------------------------------------------------
  9. using System;
  10. using System.Web.UI;
  11. using System.Web.UI.WebControls;
  12. using Itenso.WebUserForms.Controls;
  13. using Itenso.WebUserForms.Runtime;
  14. using Itenso.WebUserForms.RuntimeControls;
  15. using Itenso.WebUserForms.Data.Variable;
  16. // --------------------------------------------------------------------------
  17. public partial class RuntimeControlsPage : System.Web.UI.Page  
  18. {
  19. // ------------------------------------------------------------------------
  20. protected override void OnLoad( EventArgs e )
  21. {
  22. // load form control
  23. UserControl userForm = new UserFormLoader( "~/UserForms/RuntimeControlsUserForm.ascx" ).Load();
  24. // runtime controls
  25. ControlsAdapter controlsAdapter = new ControlsAdapter( userForm );
  26. controlsAdapter.Apply();
  27. // lookpus
  28. LookupAdapter.Apply( DemoLookupProvider.Instance, userForm );
  29. // variables
  30. IVariableSet variableSet = new DemoVariableProvider().GetVariables();
  31. VariableAdapter.ExpandVariables( variableSet, userForm );
  32. FormPlaceHolder.Controls.Add( userForm );
  33. base.OnLoad( e );
  34. } // OnLoad
  35. } // class RuntimeControlsPage
  36. // -- EOF -------------------------------------------------------------------