}//public String URI /// <summary>ButtonFileOpen_Click().</summary> public void ButtonFileOpen_Click ( Object sender, EventArgs e ) { /* XmlDataSourceURIGridView.DataFile = FilenameURI; GridViewURI.AllowPaging=false; GridViewURI.DataKeyNames=null; GridViewURI.DataSourceID = XmlDataSourceURIGridView.ID; GridViewURI.DataBind(); */ string exceptionMessage = null; string filenameXml = null; DataSet dataSet = null; try { filenameXml = FilenameURI; if ( string.IsNullOrEmpty( filenameXml ) ) { return; } UtilityURI.ReadXml ( ref filenameXml, ref dataSet, ref exceptionMessage, ref ColumnNameURI ); if ( exceptionMessage != null ) { Feedback = exceptionMessage; return; } if ( dataSet != null ) { ViewState["URIMaintenancePage_DataSet"] = dataSet; GridViewURI.AllowPaging = false; GridViewURI.AllowSorting = false; GridViewURI.DataSourceID = null; GridViewURI.DataSource = dataSet; GridViewURI.DataBind(); } }//try catch ( Exception exception ) { exceptionMessage = "Exception: " + exception.Message; } if ( exceptionMessage != null ) { Feedback = exceptionMessage; } }//public void ButtonFileOpen_Click()
/// <summary>Page Load.</summary> public void Page_Load ( object sender, EventArgs e ) { String exceptionMessage = null; ServerMapPath = this.MapPath(""); if ( !Page.IsPostBack ) { /* FilenameConfigurationXml = Server.MapPath( FilenameConfigurationXml ); */ if ( ServerMapPath != null) { FilenameConfigurationXml = ServerMapPath + @"\" + FilenameConfigurationXml; }//if ( ServerMapPath != null) UtilityURI.ConfigurationXml ( FilenameConfigurationXml, ref exceptionMessage, ref DatabaseConnectionString, ref FilenameStylesheet, ref ColumnNameURI, ref TableNameURI, ref TableNameURIDefault ); if ( exceptionMessage != null ) { Feedback = exceptionMessage; return; }//if ( exceptionMessage != null ) GridViewURI.Focus(); Page.SetFocus( GridViewURI ); DetailsViewURI.Attributes.Add("autocomplete", "on"); GridViewURI.Attributes.Add("autocomplete", "on"); }//if ( !Page.IsPostBack ) }//Page_Load