Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
SecurityUserForm.aspx.cs
Package: WebUserForms.zip [view]
Upload User: husern
Upload Date: 2022-03-24
Package Size: 534k
Code Size: 2k
Category:
Editor
Development Platform:
C#
- // -- FILE ------------------------------------------------------------------
- // name : SecurityUserForm.cs
- // project : Itenso Web User Forms
- // created : Jani Giannoudis - 2008.10.30
- // language : c#
- // environment: .NET 2.0
- // copyright : (c) 2008 by Itenso GmbH, Switzerland
- // --------------------------------------------------------------------------
- using System;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using Itenso.WebUserForms.Controls;
- // --------------------------------------------------------------------------
- public partial class SecurityPage : System.Web.UI.Page
- {
- // ------------------------------------------------------------------------
- private string WorkingFormName
- {
- get { return ViewState[ "WorkingForm" ] as string; }
- set { ViewState[ "WorkingForm" ] = value; }
- } // WorkingFormName
- // ------------------------------------------------------------------------
- protected override void OnLoad( EventArgs e )
- {
- if ( !IsPostBack )
- {
- FormListBox.Items.Add( new ListItem( "Embedded Methods", "~/UserForms/EmbeddedMethodUserForm.ascx" ) );
- FormListBox.Items.Add( new ListItem( "Embedded Fields", "~/UserForms/EmbeddedFieldUserForm.ascx" ) );
- FormListBox.SelectedIndex = 0;
- WorkingFormName = FormListBox.Items [ 0 ].Value;
- }
- SetupForm();
- base.OnLoad( e );
- } // OnLoad
- // ------------------------------------------------------------------------
- private void SetupForm()
- {
- FormPlaceHolder.Controls.Clear();
- ErrorMessagePanel.Visible = false;
- string workingFormName = WorkingFormName;
- if ( string.IsNullOrEmpty( workingFormName ) )
- {
- return;
- }
- // load form control
- try
- {
- UserControl userForm = new UserFormLoader( workingFormName ).Load();
- FormPlaceHolder.Controls.Add( userForm );
- }
- catch ( FormSecurityException ex )
- {
- ErrorMessagePanel.Visible = true;
- ErrorMessageLabel.Text = ex.Message + ": " + ex.Info;
- }
- catch ( Exception ex )
- {
- ErrorMessagePanel.Visible = true;
- ErrorMessageLabel.Text = ex.Message;
- }
- } // SetupForm
- // ------------------------------------------------------------------------
- protected void FormListBox_SelectedIndexChanged( object sender, EventArgs e )
- {
- WorkingFormName = FormListBox.SelectedValue;
- SetupForm();
- } // FormListBox_SelectedIndexChanged
- } // class SecurityPage
- // -- EOF -------------------------------------------------------------------