//******************************************************* // // The Page_Load event handler on this User Control is used to // obtain a DataReader of link information from the Links // table, and then databind the results to a templated DataList // server control. It uses the ASPNET.StarterKit.Portal.LinkDB() // data component to encapsulate all data functionality. // //******************************************************* private void Page_Load(object sender, System.EventArgs e) { // Set the link image type if (IsEditable) { linkImage = "~/images/edit.gif"; } else { linkImage = "~/images/navlink.gif"; } // Obtain links information from the Links table // and bind to the list control ASPNET.StarterKit.Portal.LinkDB links = new ASPNET.StarterKit.Portal.LinkDB(); myDataList.DataSource = links.GetLinks(ModuleId); myDataList.DataBind(); // Ensure that only users in role may add links if (PortalSecurity.IsInRoles(ModuleConfiguration.AuthorizedEditRoles)) { EditButton.Text = "Add Link"; EditButton.NavigateUrl = "~/DesktopModules/EditLinks.aspx?mid=" + ModuleId.ToString(); } }
//******************************************************* // // The Page_Load event handler on this User Control is used to // obtain a DataReader of link information from the Links // table, and then databind the results to a templated DataList // server control. It uses the ASPNET.StarterKit.Portal.LinkDB() // data component to encapsulate all data functionality. // //******************************************************* private void Page_Load(object sender, System.EventArgs e) { // Set the link image type if (IsEditable) { linkImage = "~/images/edit.gif"; } else { linkImage = "~/images/navlink.gif"; } // Obtain links information from the Links table // and bind to the datalist control ASPNET.StarterKit.Portal.LinkDB links = new ASPNET.StarterKit.Portal.LinkDB(); myDataList.DataSource = links.GetLinks(ModuleId); myDataList.DataBind(); }