1 Could not find schema information for the element 'http://schemas.microsoft.com/.NetConfiguration/v2.0:configuration'. C:\TFS\Kentico\KenticoCMS\Web.config
This is the primary error they are getting when they try to build after adding my user controls.
using System;
using System.Data;
using System.Collections;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using CMS.Controls;
using CMS.EventLog;
using CMS.GlobalHelper;
using CMS.IO;
using CMS.PortalControls;
using CMS.ExtendedControls;
/// <summary>
/// Connects to a generic filter webPart and set's the where condition for custom query data
/// </summary>
public partial class CMSWebParts_Filters_LogoFilter : CMSAbstractQueryFilterControl
{
/// <summary>
/// Child control creation.
/// </summary>
protected override void OnInit(EventArgs e)
{
SetupControl();
base.OnInit(e);
// the Click event of the Button control.
btnFilter.Click += new EventHandler(this.FilterBtn_Click);
}
/// <summary>
/// Setup the inner controls.
/// </summary>
private void SetupControl()
{
drpUsage.Visible = false;
lblUsage.Visible = false;
drpFormat.Visible = false;
lblFormat.Visible = false;
if (this.StopProcessing)
{
this.Visible = false;
}
else if (!RequestHelper.IsPostBack())
{
// Load teams options into Business Unit drop-down list
InitializeUsage();
// Load teams options into Regions drop-down list
Intializetype();
InitializeFormat();
}
}
protected void showExtras(object sender, EventArgs e)
{
if(drpType.SelectedValue != "1"){
drpUsage.Visible = true;
lblUsage.Visible = true;
drpFormat.Visible = true;
lblFormat.Visible = true;
}else{
drpUsage.Visible = false;
lblUsage.Visible = false;
drpFormat.Visible = false;
lblFormat.Visible = false;
}
}
private void Intializetype()
{
// Get administrator uder
UserInfo admin = UserInfoProvider.GetUserInfo("administrator");
if (admin != null)
{
// Get custom table provider
CustomTableItemProvider ctip = new CustomTableItemProvider(admin);
if (ctip != null)
{
// Get all mediaTypes
DataSet mediaTypes = ctip.GetItems("media.mediaTypes", null, "ItemID, ItemOrder ASC");
if (!DataHelper.DataSourceIsEmpty(mediaTypes))
{
// Bind mediaTypes to drop-down list
this.drpType.DataSource = mediaTypes.Tables[0];
this.drpType.DataTextField = "MediaTypeName";
this.drpType.DataValueField = "ItemID";
this.drpType.DataBind();
}
}
}
}
private void InitializeUsage()
{
// Initialize options
this.drpUsage.Items.Add(new ListItem("Print", "1"));
this.drpUsage.Items.Add(new ListItem("Web", "2"));
this.drpUsage.Items.Add(new ListItem("Print/Web", "3"));
}
private void InitializeFormat()
{
// Get administrator uder
UserInfo admin = UserInfoProvider.GetUserInfo("administrator");
if (admin != null)
{
// Get custom table provider
CustomTableItemProvider ctip = new CustomTableItemProvider(admin);
if (ctip != null)
{
// Get all mediaformats
DataSet mediaformats = ctip.GetItems("media.mediaformat", null, "ItemID, ItemOrder ASC");
if (!DataHelper.DataSourceIsEmpty(mediaformats))
{
// Bind mediaTypes to drop-down list
this.drpFormat.DataSource = mediaformats.Tables[0];
this.drpFormat.DataTextField = "FormatName";
this.drpFormat.DataValueField = "ItemID";
this.drpFormat.DataBind();
}
}
}
}
private void FilterBtn_Click(Object sender, EventArgs e)
{
int tp = ValidationHelper.GetInteger(this.drpType.SelectedValue, 0);
int us = ValidationHelper.GetInteger(this.drpUsage.SelectedValue, 0);
int fm = ValidationHelper.GetInteger(this.drpFormat.SelectedValue, 0);
if (tp = 1){
string where = "View_cp_mediaasset_Joined.MediaFileID = View_cp_mediaasset_Joined.MediaFileID";
if(txtSearch.Text.Length > 0 ){
where = where + " AND (View_cp_mediaasset_Joined.documentName LIKE '%" + txtSearch.Text + "%'";
}
}else{
string where = "View_cp_mediafileasset_Joined.MediafileassetID = View_cp_mediafileasset_Joined.MediafileassetID";
if(txtSearch.Text.Length > 0 ){
where = where + " AND (View_cp_mediafileasset_Joined.documentName LIKE '%" + txtSearch.Text + "%' AND View_cp_mediafileasset_Joined.mediaUsage = " + us + " AND View_cp_mediafileasset_Joined.mediaFormat = " + fm ;
}else{
where = where + " AND View_cp_mediafileasset_Joined.mediaUsage = " + us + " AND View_cp_mediafileasset_Joined.mediaFormat = " + fm ;
}
}
if (where != null)
{
// Set where condition
this.WhereCondition = where;
}
this.RaiseOnFilterChanged();
}
}
This is one of my controls.
They are on version 7 and my dev environment is version 6, but I did not think I was using anything that would cause a conflict.