+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Ajax on content view control

Ajax on content view control

11 posts, 0 answered
  1. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    12 Jan 2011
    Link to this post
    Hi,

    I am struggling with AjaxManager on content view control. I added ajaxmanager and lodigpanel on page like below . I have searched forums but didn't find any helpful information. I have tried this whatever suggestion i found on forums but couldn't make this working. Could you please provide me a sample for this .


    RadAjaxManager1.AjaxSettings.AddAjaxSetting(this.RadGrid1, this.RadGrid1, this.RadAjaxLoadingPanel1);
     RadAjaxManager1.AjaxSettings.AddAjaxSetting(this.BtnGo, this.RadGrid1, this.RadAjaxLoadingPanel1);

    protected RadAjaxManager RadAjaxManager1
          {
              get { return ListContainer.GetControl<RadAjaxManager>("RadAjaxManager1", true); }
          }
     
    protected RadGrid RadGrid1
          {
              get { return ListContainer.GetControl<RadGrid>("radgrid1", true); }
          }
     
          protected RadAjaxLoadingPanel RadAjaxLoadingPanel1
          {
              get { return ListContainer.GetControl<RadAjaxLoadingPanel>("RadAjaxLoadingPanel1", true); }
     
          }


    Thanks!
    Tarun
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    13 Jan 2011
    Link to this post
    Hello Tarun,

    when working with Ajax and Sitefinity there is one thing to consider. Since your controls are packed into user controls and are not part of the top level page markup it is preferable to add RadAjaxManager on your master page. Then in the controls where you need the RadAjaxManager control you should use RadAjaxManagerProxy and subscribe to the AjaxRequest event through the code not markup. You should also set the AjaxSettings on the proxy control.You can check the following links for more information on the Proxy control:
    RadAjax and UserControls
    RadAjax and Master/Content Pages

    You can use the approach from this forum thread. Although it is for Sitefinity 4.0 the principle of using the manager is the same.

    Regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    17 Jan 2011
    Link to this post
    Hi Radoslav,

    Thank you for your help! but I couldn't make this working on Viewcontrol (Custom module). I tried RadAjaxManagerProxy as described in link above links but didn't work at all.

    Please could you give me a simple sample(on a button click just change the label text without page refersh) of RadAjaxManagerProxy on viewcontrol. So I can get idea to apply this on for grid or another control.

    I am looking forward for your response.

    Regards,
    Tarun
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    18 Jan 2011
    Link to this post
    Hi Tarun,

    I am using the attached control template and I do not have problems ajaxifying the view.


    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    20 Jan 2011
    Link to this post
    Thank you Radoslav!

    I tried this your given control but didn't worked. I opened the site on IE6 and got some javascript error 
    * sys is undefined
    * ASP.NET Client Framework Failed To Load 

    Below is my webconfig where I hope there I have all reference. Please take a look on that


    <?xml version="1.0"?>
    <configuration>
        <configSections>
     
            <section name="MailChimpAPIconfig" type="PerceptiveMCAPI.MCAPISettings, PerceptiveMCAPI"/>
     
            <sectionGroup name="elmah">
                <!--<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>-->
     
                <section name="security" requirePermission="false" type="Elmah.SecuritySectionHandler, Elmah"/>
                <section name="errorLog" requirePermission="false" type="Elmah.ErrorLogSectionHandler, Elmah"/>
                <section name="errorMail" requirePermission="false" type="Elmah.ErrorMailSectionHandler, Elmah"/>
            </sectionGroup>
     
            <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
                        <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
                        <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                        <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
                    </sectionGroup>
                </sectionGroup>
            </sectionGroup>
            <sectionGroup name="telerik">
                <section name="urlrewrites" type="Telerik.Cms.Web.AdvancedUrlRewriter, Telerik.Cms"/>
                <section name="dataAccess" type="Telerik.DataAccess.Configuration.SectionHandler, Telerik.DataAccess" requirePermission="false"/>
                <section name="framework" type="Telerik.Framework.Configuration.SectionHandler, Telerik.Framework" requirePermission="false"/>
                <section name="localization" type="Telerik.Localization.Configuration.SectionHandler, Telerik.Localization" requirePermission="false"/>
                <section name="blogs" type="Telerik.Blogs.Configuration.SectionHandler, Telerik.Blogs" requirePermission="false"/>
                <section name="news" type="Telerik.News.Configuration.SectionHandler, Telerik.News" requirePermission="false"/>
                <section name="versioning" type="Telerik.Versioning.Configuration.SectionHandler, Telerik.Versioning" requirePermission="false"/>
                <section name="lists" type="Telerik.Lists.Configuration.SectionHandler, Telerik.Lists" requirePermission="false"/>
                <section name="cmsEngine" type="Telerik.Cms.Engine.Configuration.SectionHandler, Telerik.Cms.Engine" requirePermission="false"/>
                <section name="security" type="Telerik.Security.Configuration.SectionHandler, Telerik.Security" requirePermission="false"/>
                <section name="workflow" type="Telerik.Workflow.WorkflowSectionHandler, Telerik.Workflow" requirePermission="false"/>
                <section name="cms" type="Telerik.Cms.Configuration.SectionHandler, Telerik.Cms" requirePermission="false"/>
                <section name="polls" type="Telerik.Polls.PollsSectionHandler, Telerik.Polls" requirePermission="false"/>
                <section name="fileManager" type="Telerik.FileManager.Configuration.SectionHandler, Telerik.FileManager" requirePermission="false"/>
                <section name="forums" type="Telerik.Forums.Configuration.SectionHandler, Telerik.Forums" requirePermission="false"/>
                <section name="rss" type="Telerik.Rss.Configuration.SectionHandler, Telerik.Rss" requirePermission="false"/>
                <section name="search" type="Telerik.Search.Configuration.SectionHandler, Telerik.Search" requirePermission="false"/>
                <section name="personalization" type="Telerik.Personalization.Configuration.SectionHandler, Telerik.Personalization" requirePermission="false"/>
                <section name="libraries" type="Telerik.Libraries.Configuration.SectionHandler, Telerik.Libraries" requirePermission="false"/>
                <section name="events" type="Telerik.Events.Configuration.SectionHandler, Telerik.Events" requirePermission="false"/>
                <section name="notifications" type="Telerik.Notifications.Newsletters.Configuration.SectionHandler, Telerik.Notifications" requirePermission="false"/>
                <section name="spamProtector" type="Telerik.Cms.Engine.SpamProtector.Configuration.SpamProtectorSection, Telerik.Cms.Engine"/>
                <section name="performanceCounter" type="Telerik.Framework.Utilities.HealthMonitoring.Configuration.CountersSection, Telerik.Framework"/>
                <section name="storageSetting" type="Telerik.Libraries.AmazonStorage.StorageSection, Telerik.Libraries" requirePermission="false"/>
                <section name="mediaProvider" type="Telerik.Libraries.MediaProvider.Configuration.MediaProviderSection, Telerik.Libraries" requirePermission="false"/>
                <section name="wiki" type="Telerik.Wiki.Configuration.SectionHandler, Telerik.Wiki" requirePermission="false"/>
     
                <section name="business" type="InstantCommunity.Sitefinity.Modules.Business.Configuration.SectionHandler, InstantCommunity.Sitefinity.Modules.Business" requirePermission="false" />
                <section name="payPal" type="InstantCommunity.Sitefinity.Modules.PayPal.Configuration.SectionHandler, InstantCommunity.Sitefinity.Modules.PayPal" requirePermission="false"/>
                <section name="suspectIP" type="InstantCommunity.Sitefinity.Modules.SuspectIP.Configuration.SectionHandler, InstantCommunity.Sitefinity.Modules.SuspectIP" requirePermission="false"/>
                <section name="notification" type="InstantCommunity.Sitefinity.Modules.Notification.Configuration.SectionHandler, InstantCommunity.Sitefinity.Modules.Notification" requirePermission="false"/>
     
     
            </sectionGroup>
        </configSections>
     
        <appSettings>
             
     
        </appSettings>
        <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
                </dependentAssembly>
                <dependentAssembly>
                    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
                </dependentAssembly>
            </assemblyBinding>
        </runtime>
        <!--<connectionStrings>
        add name="Sitefinity" connectionString="data source=.\sqlexpress;Integrated Security=SSPI;initial catalog=dbSacITPortal" providerName="System.Data.SqlClient"/>
        <add name="Sitefinity" connectionString="data source=.\sqlexpress;Integrated Security=SSPI;initial catalog=dbSacITPortal" providerName="System.Data.SqlClient"/>
      </connectionStrings>-->
        <connectionStrings>
            <!--<add name="Sitefinity" connectionString="data source=10.123.203.10;UID=sf_sacitportal!;PWD=sf_sacitportal!;initial catalog=sf_sacitportal" providerName="System.Data.SqlClient"/>
        <add name="ELMAH.SQLite" connectionString="data source=10.123.203.10;UID=sf_sacitportal!;PWD=sf_sacitportal!;initial catalog=sf_sacitportal" providerName="System.Data.SqlClient"/>-->
            <add name="Sitefinity" connectionString="data source=(local);UID=sa;PWD=tarunv;initial catalog=123" providerName="System.Data.SqlClient"/>
            <add name="ELMAH.SQLite" connectionString="data source=(local);UID=sa;PWD=tarunv;initial catalog=123" providerName="System.Data.SqlClient"/>
     
        </connectionStrings>
        <system.net>
            <mailSettings>
                <smtp from="mail@sacitportal.com">
                    <network defaultCredentials="true"  host="mail01.instantcommunity.com" />
                </smtp>
                <!--<smtp deliveryMethod="SpecifiedPickupDirectory">
                    <specifiedPickupDirectory pickupDirectoryLocation="D:\Portal\Tests\Test\Mails"/>
                </smtp>-->
            </mailSettings>
        </system.net>
     
        <system.web>
     
            <!-- Sets the allowed upload file size -->
            <httpRuntime maxRequestLength="51200"/>
            <pages>
                <controls>
                    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
                    <add tagPrefix="telerik" namespace="Telerik.Charting" assembly="Telerik.Web.UI"/>
                    <add tagPrefix="telerik" namespace="Telerik.Cms.Web.UI" assembly="Telerik.Cms.Web.UI"/>
                    <add tagPrefix="telerik" namespace="Telerik.Cms.Web.UI" assembly="Telerik.Framework"/>
                </controls>
            </pages>
            <httpHandlers>
                <add verb="*" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/>
                <add verb="*" path="*.rss" type="Telerik.Rss.RssHttpHandler, Telerik.Rss"/>
                <add verb="*" path="*.rss.ashx" type="Telerik.Rss.RssHttpHandler, Telerik.Rss"/>
                <add verb="*" path="*.sflb" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add verb="*" path="*.sflb.ashx" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add verb="*" path="*.tmb" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add verb="*" path="*.tmb.ashx" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add verb="*" validate="false" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI"/>
                <add verb="*" validate="false" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"/>
                <add verb="*" validate="false" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI"/>
                <remove verb="*" path="*.asmx"/>
                <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
                <add verb="GET" path="CaptchaImage.axd" type="Telerik.Web.UI.SpamProtection.Captcha.CaptchaImageHandler, Telerik.Cms.Web.UI"/>
                <add verb="POST" path="blogs/metablog.ashx" type="Telerik.Blogs.MetaWeblog.MetaWeblogHandler, Telerik.Blogs"/>
                <add verb="POST" path="trackback.ashx" type="Telerik.Cms.Engine.Trackback.TrackbackHandler, Telerik.Cms.Engine"/>
                <add verb="GET" path="*.s3lb" type="Telerik.Libraries.AmazonStorage.S3StorageHandler, Telerik.Libraries"/>
                <add verb="GET" path="*.s3lb.ashx" type="Telerik.Libraries.AmazonStorage.S3StorageHandler, Telerik.Libraries"/>
                <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
                <add verb="POST,GET,HEAD" path="elmah.axd" type="Elmah.ErrorLogPageFactory, Elmah"/>
                <add verb="*" path="IPN.aspx" type="InstantCommunity.Sitefinity.Modules.PayPal.IPNHandler,InstantCommunity.Sitefinity.Modules.PayPal"/>
                <add verb="*" path="users/*.aspx" type="InstantCommunity.Sitefinity.Controls.UrlHandler,InstantCommunity.Sitefinity.Controls"/>
                <!--<add verb="*" path="users/*.aspx" type="MyHandler.UrlHandler,MyHandler"/>-->
     
            </httpHandlers>
            <customErrors mode="Off">
                <error redirect="~/Sitefinity/nopermissions.aspx" statusCode="403"/>
            </customErrors>
            <compilation debug="true">
                <assemblies>
                    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
                </assemblies>
            </compilation>
            <roleManager enabled="true" cacheRolesInCookie="true" defaultProvider="Sitefinity">
                <providers>
                    <clear/>
                    <add connectionStringName="DefaultConnection" applicationName="/" name="Sitefinity" type="Telerik.DataAccess.AspnetProviders.TelerikRoleProvider, Telerik.DataAccess"/>
                </providers>
            </roleManager>
            <membership defaultProvider="Sitefinity" userIsOnlineTimeWindow="15" hashAlgorithmType="">
                <providers>
                    <clear/>
                    <add name="Sitefinity" connectionStringName="DefaultConnection" type="CustomMembershipProvider, App_Code" enablePasswordRetrieval="true" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="/" requiresUniqueEmail="false" passwordFormat="Clear" maxInvalidPasswordAttempts="5" passwordAttemptWindow="10" passwordStrengthRegularExpression="" minRequiredPasswordLength="8" minRequiredNonalphanumericCharacters="1"/>
     
                </providers>
            </membership>
            <profile defaultProvider="Sitefinity">
                <providers>
                    <clear/>
                    <add name="Sitefinity" connectionStringName="DefaultConnection" applicationName="/" type="Telerik.DataAccess.AspnetProviders.TelerikProfileProvider, Telerik.DataAccess"/>
                </providers>
                <properties>
                    <add name="FirstName"/>
                    <add name="LastName"/>
                    <add name="Position"/>
     
                    <add name="Karma" type="Integer"/>
                    <add name="IsVarified" type="Boolean"/>
                    <add name="ZipCode"/>
                    <add name="NumForumPosts" type="Integer"/>
                    <add name="HowHear"/>
                    <add name="MorningReportFrequency"/>
                    <add name="ShowAvatar" type="Boolean" />
                    <add name="UserID" type="Integer"/>
                    <add name="IsDeleted" type="Boolean"/>
     
     
                    <add name="Photo_Hidden"/>
                    <add name="Photo" defaultValue="~/Sitefinity/Common/Images/defaultavatar.gif"/>
                    <group name="InstantMessenger">
                        <add name="IM_Type"/>
                        <add name="IM_Value"/>
                    </group>
                    <group name="Phone">
                        <add name="Value"/>
                        <add name="Type"/>
     
                    </group>
                    <add name="OriginalFirstName"/>
                    <add name="OriginalLastName"/>
                    <add name="OriginalEmail"/>
                    <add name="OriginalPassword"/>
                    <add name="OriginalSuspectIP"/>
                    <add name="FromSuspectIP" type="Boolean"/>
                    <add name="ActivateUserLink"/>
     
     
                </properties>
            </profile>
            <httpModules>
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
     
                <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
     
     
                <add name="Cms" type="Telerik.Cms.Web.CmsHttpModule, Telerik.Cms"/>
                <add name="CmsHttpModuleUrlRewrite" type="Telerik.Cms.Web.CmsHttpModuleUrlRewrite, Telerik.Cms"/>
     
                <!-- Http Module for extension mappings in Library module.-->
                <!--<add name="LibraryModule" type="Telerik.Libraries.LibraryHttpModule, Telerik.Libraries"/>-->
                <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>
     
                <add name="ErrorMail" type="Elmah.ErrorMailModule, Elmah"/>
                <add name="ErrorLog" type="Elmah.ErrorLogModule, Elmah"/>
                <add name="ErrorFilter" type="Elmah.ErrorFilterModule, Elmah"/>
     
            </httpModules>
            <authentication mode="Forms">
                <forms name=".ASPNET" loginUrl="~/Login.aspx" protection="All" timeout="1440" path="/"/>
            </authentication>
            <authorization>
                <allow users="?"/>
            </authorization>
            <siteMap defaultProvider="CmsSiteMapProvider" enabled="true">
                <providers>
                    <clear/>
                    <add name="CmsSiteMapProvider" description="Displays Cms Pages" type="Telerik.Cms.Web.CmsSiteMapProvider"/>
                </providers>
            </siteMap>
            <healthMonitoring enabled="true" heartbeatInterval="0">
                <eventMappings>
                    <add name="Simple Web Request Event" type="Telerik.Utilities.SimpleWebRequestEvent,Telerik.Framework"/>
                    <add name="Code Benchmark Event" type="Telerik.Utilities.CodeBenchmarkEvent,Telerik.Framework"/>
                </eventMappings>
                <providers>
                    <add name="Simple Web Event Provider" type="Telerik.Utilities.TextFileWebEventProvider,Telerik.Framework" logFileName="~/App_Data/sitefinity.log"/>
                    <add name="Simple Web Buffered Event Provider" type="Telerik.Utilities.BufferedTextFileWebEventProvider,Telerik.Framework" bufferMode="Notification" logFileName="~/App_Data/sitefinity.log"/>
                    <add name="Code Benchmark Provider" type="Telerik.Utilities.CodeBenchmarkTextFileProvider,Telerik.Framework" enabled="False" logFileName="~/App_Data/performance.log"/>
                </providers>
                <rules>
                    <add name="SitefinityEventHandler" eventName="Simple Web Request Event" provider="Simple Web Event Provider" minInterval="00:00:00" minInstances="1" maxLimit="Infinite"/>
                    <add name="SitefinityErrorHandler" eventName="All Errors" provider="Simple Web Event Provider" minInterval="00:00:00" minInstances="1" maxLimit="Infinite"/>
                    <add name="SitefinityCodeBenchmarkHandler" eventName="Code Benchmark Event" provider="Code Benchmark Provider" minInterval="00:00:00" minInstances="1" maxLimit="Infinite"/>
                </rules>
            </healthMonitoring>
        </system.web>
        <elmah>
            <errorLog type="Elmah.SQLiteErrorLog, Elmah" connectionStringName="ELMAH.SQLite" />
            <errorMail from="noreply@example.com" to="elmah@example.com" priority="high" />
        </elmah>
     
     
        <system.web.extensions>
            <scripting>
                <!--The Following lines value should be true in production server-->
                <scriptResourceHandler enableCompression="false" enableCaching="false"/>
            </scripting>
        </system.web.extensions>
        <system.webServer>
            <validation validateIntegratedModeConfiguration="false"/>
            <modules>
                <remove name="ScriptModule"/>
                <remove name="Cms"/>
                <!--<remove name="LibraryModule"/>-->
                <remove name="RadUploadModule"/>
                <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="Cms" type="Telerik.Cms.Web.CmsHttpModule, Telerik.Cms"/>
                <!-- Http Module for extension mappings in Library module.-->
                <!--<add name="LibraryModule" type="Telerik.Libraries.LibraryHttpModule, Telerik.Libraries"/>-->
                <add name="RadUploadModule" preCondition="managedHandler" type="Telerik.Web.UI.RadUploadHttpModule, Telerik.Web.UI"/>
            </modules>
            <handlers>
                <remove name="ScriptResource"/>
                <remove name="WebServiceHandlerFactory-Integrated"/>
                <remove name="ScriptHandlerFactory"/>
                <remove name="ScriptHandlerFactoryAppServices"/>
                <remove name="SitefinityTemplate"/>
                <remove name="SitefinityThumbnail"/>
                <remove name="SitefinityLibrary"/>
                <remove name="RadUploadProgress"/>
                <remove name="SitefinityRSS"/>
                <remove name="Dialog"/>
                <remove name="Spellcheck"/>
                <remove name="ChartImage"/>
                <remove name="CaptchaImage"/>
                <remove name="Metablog"/>
                <remove name="Trackback"/>
                <remove name="AmazonLibrary"/>
                <remove name="AmazonLibraryAdd"/>
                <remove name="SitefinityThumbnailAdd"/>
                <remove name="SitefinityRSSAdd"/>
                <remove name="SitefinityLibraryAdd"/>
                <remove name="Telerik_Web_UI_WebResource_axd"/>
                <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
                <add name="SitefinityTemplate" path="*.template" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv2.0,bitness32"/>
                <add name="SitefinityThumbnail" path="*.tmb" verb="*" preCondition="integratedMode" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add name="SitefinityThumbnailAdd" path="*.tmb.ashx" verb="*" preCondition="integratedMode" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add name="SitefinityLibrary" path="*.sflb" verb="*" preCondition="integratedMode" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add name="SitefinityLibraryAdd" path="*.sflb.ashx" verb="*" preCondition="integratedMode" type="Telerik.Cms.Engine.ContentHttpHandler, Telerik.Cms.Engine"/>
                <add name="SitefinityRSS" preCondition="integratedMode" verb="*" path="*.rss" type="Telerik.Rss.RssHttpHandler, Telerik.Rss"/>
                <add name="SitefinityRSSAdd" preCondition="integratedMode" verb="*" path="*.rss.ashx" type="Telerik.Rss.RssHttpHandler, Telerik.Rss"/>
                <add name="RadUploadProgress" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.Upload.RadUploadProgressHandler, Telerik.Web.UI"/>
                <add name="Dialog" preCondition="integratedMode" verb="*" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler, Telerik.Web.UI"/>
                <add name="Spellcheck" preCondition="integratedMode" verb="*" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI"/>
                <add name="ChartImage" preCondition="integratedMode" verb="*" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler, Telerik.Web.UI"/>
                <add name="CaptchaImage" preCondition="integratedMode" verb="GET" path="CaptchaImage.axd" type="Telerik.Web.UI.SpamProtection.Captcha.CaptchaImageHandler, Telerik.Cms.Web.UI"/>
                <add name="Metablog" preCondition="integratedMode" verb="POST" path="blogs/metablog.ashx" type="Telerik.Blogs.MetaWeblog.MetaWeblogHandler, Telerik.Blogs"/>
                <add name="Trackback" preCondition="integratedMode" verb="POST" path="trackback.ashx" type="Telerik.Cms.Engine.Trackback.TrackbackHandler, Telerik.Cms.Engine"/>
                <add name="AmazonLibrary" path="*.s3lb" verb="*" preCondition="integratedMode" type="Telerik.Libraries.AmazonStorage.S3StorageHandler, Telerik.Libraries"/>
                <add name="AmazonLibraryAdd" path="*.s3lb.ashx" verb="*" preCondition="integratedMode" type="Telerik.Libraries.AmazonStorage.S3StorageHandler, Telerik.Libraries"/>
                <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI"/>
                <!--<add name="UserProfiles" path="users/*.aspx" verb="*" preCondition="integratedMode" type="MyHandler.UrlHandler,MyHandler"/>-->
                <add name="UserProfiles" verb="*" path="users/*.aspx" preCondition="integratedMode" type="InstantCommunity.Sitefinity.Controls.UrlHandler,InstantCommunity.Sitefinity.Controls"/>
                <add name="PayPalNotify" verb="*" path="IPN.aspx" preCondition="integratedMode" type="InstantCommunity.Sitefinity.Modules.PayPal.IPNHandler,InstantCommunity.Sitefinity.Modules.PayPal"/>
     
            </handlers>
        </system.webServer>
        <system.codedom>
            <compilers>
                <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="WarnAsError" value="false"/>
                </compiler>
                <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">
                    <providerOption name="CompilerVersion" value="v3.5"/>
                    <providerOption name="OptionInfer" value="true"/>
                    <providerOption name="WarnAsError" value="false"/>
                </compiler>
            </compilers>
        </system.codedom>
        <telerik>
     
            <dataAccess defaultConnection="DefaultConnection">
                <connections>
                    <add name="DefaultConnection" driver="Telerik.DataAccess.Providers.ExtendedSqlServer2005Provider, Telerik.DataAccess" connectionStringName="Sitefinity"/>
                    <add name="GenericContentConnection" driver="Telerik.Cms.Engine.Data.Providers.GCSql2005Provider, Telerik.Cms.Engine.Data" connectionStringName="Sitefinity"/>
                </connections>
            </dataAccess>
            <framework>
                <caching defaultProvider="memoryCache">
                    <providers>
                        <add name="memoryCache" type="Telerik.Caching.MemoryCachingProvider, Telerik.Framework"/>
                        <add name="ASPNET" type="Telerik.Caching.AspNetCachingProvider, Telerik.Framework" duration="120" slidingExpiration="true"/>
                    </providers>
                    <cacheDependency mode="InMemory"/>
                </caching>
                <modules>
                    <add type="Telerik.Cms.Engine.GenericContentModule, Telerik.Cms.Engine"/>
                    <add type="Telerik.News.NewsModule, Telerik.News"/>
                    <add type="Telerik.Blogs.BlogsModule, Telerik.Blogs"/>
                    <add type="Telerik.Lists.ListModule, Telerik.Lists"/>
                    <add type="InstantCommunity.Sitefinity.Modules.Business.BusinessModule, InstantCommunity.Sitefinity.Modules.Business" />
                    <add type="InstantCommunity.Sitefinity.Modules.Notification.NotificationModule, InstantCommunity.Sitefinity.Modules.Notification"/>
                    <add type="InstantCommunity.Sitefinity.Modules.PayPal.PayPalModule, InstantCommunity.Sitefinity.Modules.PayPal"/>
                    <add type="InstantCommunity.Sitefinity.Modules.SuspectIP.SuspectIPModule, InstantCommunity.Sitefinity.Modules.SuspectIP"/>
     
                    <add type="Telerik.Polls.PollModule, Telerik.Polls"/>
                    <add type="Telerik.Forums.ForumsModule, Telerik.Forums"/>
                    <add type="Telerik.Libraries.LibrariesModule, Telerik.Libraries"/>
                    <add type="Telerik.Events.EventsModule, Telerik.Events"/>
                    <add type="Telerik.Notifications.Newsletters.NewsletterModule, Telerik.Notifications"/>
                    <add type="Telerik.Wiki.WikiModule, Telerik.Wiki"/>
                </modules>
                <services>
                    <add type="Telerik.Search.SearchModule, Telerik.Search"/>
                    <add type="Telerik.Search.Engine.IndexingManager, Telerik.Search"/>
                    <add type="Telerik.Rss.RssModule, Telerik.Rss"/>
                    <add type="Telerik.Rss.RssProviderService, Telerik.Rss"/>
                    <add type="Telerik.Cms.Engine.ContentUrlRewriterService, Telerik.Cms.Engine"/>
                </services>
                <tools>
                    <add type="Telerik.Cms.Tools.SiteExporter, Telerik.Cms"/>
                </tools>
                <assemblies>
                </assemblies>
                <controlDesigners>
                    <add key="System.Web.UI.WebControls.Image" value="Telerik.Libraries.WebControls.ImageEditorDialog, Telerik.Libraries"/>
                    <add key="Telerik.Cms.Engine.WebControls.SitefinityImage" value="Telerik.Libraries.WebControls.ImageEditorDialog, Telerik.Libraries"/>
                </controlDesigners>
                <propertySelectors>
                    <add key="System.Web.UI.Design.ImageUrlEditor" value="Telerik.Libraries.WebControls.ImageSelector, Telerik.Libraries"/>
                </propertySelectors>
                <sitefinityConfiguration defaultProvider="XmlConfigProvider">
                    <providers>
                        <add name="XmlConfigProvider" type="Telerik.Sitefinity.Configuration.XmlConfigProvider, Telerik.Framework"/>
                    </providers>
                </sitefinityConfiguration>
            </framework>
            <notifications defaultProvider="Notifications">
                <providers>
                    <clear/>
                    <add name="Notifications" type="Telerik.Notifications.Data.DefaultProvider, Telerik.Notifications.Data" connectionStringName="DefaultConnection" EnableSsl="false" MergedFields="FirstName;LastName" SendingInterval="1000"/>
                </providers>
            </notifications>
            <search defaultProvider="Search">
                <providers>
                    <clear/>
                    <add name="Search" type="Telerik.Search.Data.DefaultProvider, Telerik.Search.Data" connectionStringName="DefaultConnection" useCompoundIndexFile="true"/>
                </providers>
                <indexClients>
                    <add name="PageIndex" type="Telerik.Cms.Search.PageIndexProvider, Telerik.Cms" settingsControl="Telerik.Cms.Web.UI.PageIndexSettings, Telerik.Cms" viewSettingsControl="Telerik.Cms.Web.UI.SearchViewControl, Telerik.Cms" description="Provides indexing services for CMS Pages."/>
                </indexClients>
                <indexers>
                    <add extensionOrMimeType=".aspx" type="Telerik.Search.Engine.HtmlIndexer"/>
                    <add extensionOrMimeType="text/html" type="Telerik.Search.Engine.HtmlIndexer"/>
                </indexers>
                <searchInputValidation>
                    <add matchPattern="\A[\*\?\~][^\s]*" replacementString="" enabled="true" matchAlert="You can not start your query using wildcards, modify your query and try again.."/>
                    <add matchPattern="[\!\^\(\)\{\}\[\]]" replacementString="" enabled="true" matchAlert="Strange characters should be enclosed between double quotation, modify your query and try again.."/>
                </searchInputValidation>
            </search>
            <localization defaultProvider="Sitefinity" persistenceMode="None" defaultCulture="en" cultures="en, es, fr, de, bg">
                <providers>
                    <clear/>
                    <add name="Sitefinity" type="Telerik.Localization.Data.DefaultProvider, Telerik.Localization.Data" connectionStringName="DefaultConnection"/>
                </providers>
            </localization>
            <lists defaultProvider="Sitefinity">
                <providers>
                    <clear/>
                    <add name="Sitefinity" securityProviderName="" type="Telerik.Lists.Data.DefaultProvider, Telerik.Lists.Data" connectionStringName="DefaultConnection" visible="true"/>
                    <!--
                    <add name="SitefinityXml" securityProviderName="" type="Telerik.Lists.Data.XmlProvider, Telerik.Lists.Data" dataFile="~/App_Data/Lists.xml" visible="true"  />
                    -->
                </providers>
            </lists>
            <forums defaultProvider="Sitefinity">
                <providers>
                    <clear/>
                    <add name="Sitefinity" securityProviderName="" profileProviderName="Sitefinity" type="Telerik.Forums.Data.DefaultProvider, Telerik.Forums.Data" connectionStringName="DefaultConnection" visible="true"/>
                </providers>
            </forums>
            <rss defaultProvider="Sitefinity">
                <feeds>
                </feeds>
                <channelProviders>
                    <clear/>
                    <add name="Page Rss Provider" type="Telerik.Cms.Web.RssChannelProvider, Telerik.Cms" settingsControl="Telerik.Cms.Web.UI.RssSettingsControl, Telerik.Cms" viewSettingsControl="Telerik.Cms.Web.UI.RssViewSettingsControl, Telerik.Cms" description="Provides RSS for CMS pages"/>
                </channelProviders>
                <providers>
                    <clear/>
                    <add name="Sitefinity" type="Telerik.Rss.Data.DefaultServiceProvider, Telerik.Rss.Data" connectionStringName="DefaultConnection"/>
                </providers>
            </rss>
            <versioning defaultProvider="Sitefinity">
                <providers>
                    <clear/>
                    <add name="Sitefinity" type="Telerik.Versioning.Data.DefaultProvider, Telerik.Versioning.Data" connectionStringName="DefaultConnection"/>
                </providers>
            </versioning>
            <security defaultProvider="DefaultSecurityProvider" cmsProvidersName="Sitefinity">
                <roles>
                    <clear/>
                    <add name="Administrators" permission="Unrestricted"/>
                </roles>
                <providers>
                    <clear/>
                    <add name="DefaultSecurityProvider" connectionStringName="DefaultConnection" type="Telerik.Security.Data.DefaultSecurityProvider, Telerik.Security.Data" membershipProvider="Sitefinity" roleProvider="Sitefinity"/>
                </providers>
            </security>
            <cms defaultProvider="Sitefinity" pageExtension=".aspx" siteTemplate=""
       projectName="SacITPortal" disabled="false" pageEditorUIMode="Overlay">
                <providers>
                    <clear />
                    <add connectionStringName="DefaultConnection" allowPageHistory="true"
                     allowPageWorkflow="false" cachingProviderName="ASPNET" name="Sitefinity"
                     type="Telerik.Cms.Data.DefaultProvider, Telerik.Cms.Data" />
                    <add urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False"
                     defaultMetaField="Name" securityProviderName="" allowVersioning="True"
                     applicationName="/Business" versioningProviderName="" allowComments="false"
                     commentsModeration="true" connectionStringName="GenericContentConnection"
                     name="Business" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data" />
                    <add urlRewriteFormat="[SuspectIP].aspx" urlWhitespaceChar="_"
                     visible="False" defaultMetaField="SuspectIP" securityProviderName=""
                     allowVersioning="True" applicationName="/SuspectIP" versioningProviderName=""
                     allowComments="false" commentsModeration="true" connectionStringName="GenericContentConnection"
                     name="SuspectIP" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data" />
                    <add urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False"
                     defaultMetaField="Name" securityProviderName="" allowVersioning="True"
                     applicationName="/Notification" versioningProviderName="" allowComments="false"
                     commentsModeration="true" connectionStringName="GenericContentConnection"
                     name="Notification" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data" />
                </providers>
                <toolboxControls>
                    <clear />
                    <add name="Generic Content" section="Most popular" type="Telerik.Cms.Engine.WebControls.GenericContent, Telerik.Cms.Engine" />
                    <add name="Image" section="Most popular" type="Telerik.Cms.Engine.WebControls.SitefinityImage, Telerik.Cms.Engine"
                     description="Displays an image on a Web page." />
                    <add name="Image gallery" section="Most popular" type="Telerik.Libraries.WebControls.ImageGallery, Telerik.Libraries" />
                    <add name="Dynamic Hyper Link" section="Navigation" type="Telerik.Cms.Engine.WebControls.DynamicHyperLink, Telerik.Cms.Engine"
                     description="Dynamic Hyper Link lets you declare link for cms pages so that its Navigate URL doesn't not depend on where the page is located in the hierarchy." />
                    <add name="Site Menu" section="Navigation" url="~/Sitefinity/UserControls/Navigation35/SiteMenu.ascx" />
                    <add name="Site Panelbar" section="Navigation" url="~/Sitefinity/UserControls/Navigation35/SitePanelbar.ascx" />
                    <add name="Site Tabstrip" section="Navigation" url="~/Sitefinity/UserControls/Navigation35/SiteTabstrip.ascx" />
                    <add name="Site Treeview" section="Navigation" url="~/Sitefinity/UserControls/Navigation35/SiteTreeview.ascx" />
                    <add name="Breadcrumb" section="Navigation" type="Telerik.Cms.Web.UI.Breadcrumb, Telerik.Cms.Web.UI" />
                    <add name="Hyper Link" section="Navigation" type="Telerik.Cms.Engine.WebControls.SitefinityHyperLink, Telerik.Cms.Engine"
                     description="Creates links on a Web page that allow users to move from page to page in your application." />
                    <add name="Language Selector" section="Navigation" type="Telerik.Localization.WebControls.LanguageBar,Telerik.Localization"
                     description="A control for selecting the current language current version" />
                    <add name="RadTabStrip" section="RadControls" type="Telerik.Web.UI.RadTabStrip, Telerik.Web.UI" />
                    <add name="RadMenu" section="RadControls" type="Telerik.Web.UI.RadMenu, Telerik.Web.UI" />
                    <add name="RadPanelBar" section="RadControls" type="Telerik.Web.UI.RadPanelBar, Telerik.Web.UI" />
                    <add name="Image " section="Images & Documents" type="Telerik.Cms.Engine.WebControls.SitefinityImage, Telerik.Cms.Engine"
                     description="Displays an image on a Web page." />
                    <add name="XML Data Source" section="Data" type="System.Web.UI.WebControls.XmlDataSource, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                     description="Represents an XML data source to data-bound controls." />
                    <add name="SiteMapDataSource" section="Data" type="System.Web.UI.WebControls.SiteMapDataSource, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                     description="Provides a data source control that Web server controls and other controls can use to bind to hierarchical site map data. " />
                    <add name="Details View" section="Data" type="System.Web.UI.WebControls.DetailsView, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                     description="Displays the values of a single record from a data source in a table, where each data row represents a field of the record. The DetailsView control allows you to edit, delete, and insert records." />
                    <add name="Grid View" section="Data" type="System.Web.UI.WebControls.GridView, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
                    <add name="Login Status" section="Login" type="System.Web.UI.WebControls.LoginStatus, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                     description="Detects the user's authentication state and toggles the state of a link to log in to or log out of a Web site." />
                    <add name="Login Name" section="Login" type="System.Web.UI.WebControls.LoginName, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
                     description="Displays the value of the System.Web.UI.Page.User.Identity.Name property." />
                    <add name="Login" section="Login" url="~/Sitefinity/UserControls/Login/LoginControl.ascx"
                     description="Provides user interface (UI) elements for logging in to a Web site." />
                    <add name="ForgotUsernamePassword" section="CustomControl" url="~/UserControls/CustomControl/ForgotUsernamePassword.ascx" />
                    <add name="Manage Profile" section="Login" type="Telerik.Security.WebControls.ManageProfile, Telerik.Security"
                     description="Provides UI for managing user's profile information" />
                    <add name="Login View" section="Login" url="~/Sitefinity/UserControlsLoginViewControl.ascx"
                     description="Displays the appropriate content template for a given user, based on the user's authentication status and role membership." />
                    <add name="Spam Protector" section="Forms" type="Telerik.Web.UI.SpamProtection.SpamProtector, Telerik.Cms.Web.UI"
                     description="Provides spam protection to web forms using different strategies." />
                    <add name="Video" section="Most popular" type="Telerik.Libraries.WebControls.Video, Telerik.Libraries"
                     description="Video content control" />
                    <add name="ActivateUser" section="Login" url="~/UserControls/Login/UserActivation.ascx" />
                    <add name="MyProfile" section="CustomControl" url="~/UserControls/CustomControl/uxChangePassword.ascx" />
                    <add name="ImportNewsControl" section="CustomControl" url="~/UserControls/CustomControl/ImportNews.ascx" />
                    <add name="ImportForumControl" section="CustomControl" url="~/UserControls/CustomControl/ImportForum.ascx" />
                    <add name="ImportForumPostControl" section="CustomControl" url="~/UserControls/CustomControl/ImportForumPosts.ascx" />
                    <add name="ImportEventsControl" section="CustomControl" url="~/UserControls/CustomControl/ImportEvents.ascx" />
                    <add name="ImportJobs" section="CustomControl" url="~/UserControls/CustomControl/Import_Jobs.ascx" />
                    <add name="Slide Show" section="CustomControl" url="~/UserControls/SlideShow.ascx"
                     description="Gallery Slide Show" />
                    <add name="Recent Blogs" section="CustomControl" url="~/UserControls/RecentBlogs.ascx"
                     description="Recent Blogs" />
                    <add name="MyBusinessContent" section="CustomControl" url="~/UserControls/CustomControl/MyBusinessContent.ascx" />
                    <add name="MyBusinessCard" section="CustomControl" url="~/UserControls/CustomControl/MyBusinessCard.ascx"
                     description="MyBusinessCard" />
                    <add name="MyBusinessHrsAvail" section="CustomControl" url="~/UserControls/CustomControl/MyBusinessHrsAvail.ascx" />
                    <add name="MyBusinessUrl" section="CustomControl" url="~/UserControls/CustomControl/MyBusinessUrl.ascx" />
                    <add name="MyBusinessHeader" section="CustomControl" url="~/UserControls/CustomControl/MyBusinessHeader.ascx"
                     description="MyBusinessHeader" />
                    <add name="MyBusinessUploadBanner" section="CustomControl" url="~/UserControls/CustomControl/MyBusinessUploadBanner.ascx" />
                    <add name="MyBusinessKeyword" section="CustomControl" url="~/UserControls/CustomControl/MyBusinessKeywords.ascx" />
                    <add name="UserProfile" section="CustomControl" url="~/UserControls/CustomControl/UserProfile.ascx" />
                    <add name="Who's On" section="CustomControl" url="~/UserControls/CustomControl/WhoIsOn.ascx" />
                    <add name="Anniversaries" section="CustomControl" url="~/UserControls/CustomControl/Anniversaries.ascx"
                     description="Anniversaries" />
                    <add name="ImportBusiness" section="CustomControl" url="~/UserControls/CustomControl/ImportBusiness.ascx" />
                    <add name="TellAFriend" section="CustomControl" url="~/UserControls/CustomControl/TellAFriend.ascx"
                     description="Tell a friend" />
                    <add name="CreateUser" section="CustomControl" url="~/UserControls/CustomControl/CreateUserWizardControl.ascx"
                     description="User sign-up form" />
                    <add name="Verify" section="CustomControl" url="~/UserControls/CustomControl/VerifyResult.ascx"
                     description="Verify result control to show status after paypal verification " />
                    <add name="VerificationControl" section="CustomControl" url="~/UserControls/CustomControl/VerificationControl.ascx"
                     description="VerificationControl for paypal verification" />
                    <add name="PaymentNotificationControl" section="CustomControl"
                     url="~/UserControls/CustomControl/PaymentNotificationControl.ascx"
                     description="Instant payment Notification Control" />
                    <add name="TrackingUsers" section="CustomControl" url="~/UserControls/CustomControl/TrackingUsers.ascx"
                     description="Tracking Users with Multiple Accounts" />
                    <add name="NotificationControl" section="CustomControl" url="~/UserControls/CustomControl/Notification.ascx"
                     description="System notification for users" />
                    <add name="HitData" section="CustomControl" url="~/UserControls/CustomControl/HitData.ascx" />
                    <add name="ContentsControl" section="CustomControl" url="~/UserControls/CustomControl/CommonPublicViewl.ascx" />
                    <add name="CustomContentView" section="IT" type="CustomSearchableViewControl.CustomContentView,CustomSearchableViewControl, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"
                     description="" />
                    <add name="CustomSearchableNewsView" section="News" url="~/UserControls/News/CustomContentView.ascx"
                     description="Custom searchable news control" />
                </toolboxControls>
            </cms>
            <cmsEngine defaultProvider="Generic_Content">
                <providers>
                    <clear/>
                    <add name="Generic_Content" urlRewriteFormat="[Publication_Date]/[Name].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="True" defaultMetaField="Name" securityProviderName="" allowLocalization="False" allowVersioning="True" allowWorkflow="False" allowComments="false" commentsModeration="true" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"/>
                    <add name="News" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Title" securityProviderName="" allowVersioning="True" applicationName="/News" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data"/>
                    <add name="Blogs" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Title" applicationName="/Blogs" allowVersioning="True" allowComments="true" commentsModeration="false" allowLocalization="False" localizationProviderName="" allowWorkflow="False" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Blogs.Data.DefaultBlogProvider, Telerik.Blogs.Data"/>
                    <add name="Libraries" urlRewriteFormat="~/{Provider}/{LibraryName}/[Name].sflb.ashx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" applicationName="/Libraries" allowVersioning="False" allowLocalization="False" localizationProviderName="" allowWorkflow="False" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Libraries.Data.DefaultProvider, Telerik.Libraries.Data" tagEditorTemplate="~/Sitefinity/Admin/ControlTemplates/Libraries/BatchTagsEditor.ascx"/>
                    <!--Amazon Data Provider [First turn off the default one] url format can be urlRewriteFormat="~/{Provider}/{LibraryName}/[Name].s3lb" as well in that cae there will extra libraries in the url-->
                    <!--<add name="Libraries" urlRewriteFormat="~/{LibraryName}/[Name].s3lb"  thumbnailExtension=".tmb" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" applicationName="/Libraries" allowVersioning="True" allowLocalization="False" localizationProviderName="" allowWorkflow="False" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Libraries.Data.AmazonProvider, Telerik.Libraries.Data" tagEditorTemplate="~/Sitefinity/Admin/ControlTemplates/Libraries/BatchTagsEditor.ascx" />-->
                    <!--Viddler Data Provider Compatible with other libraries, must add a libraryInfo with type = "Viddler"-->
                    <!--<add name="Libraries" urlRewriteFormat="~/{LibraryName}/[Name].sflb.ashx" thumbnailExtension=".tmb.ashx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" applicationName="/Libraries" allowVersioning="True" allowLocalization="False" localizationProviderName="" allowWorkflow="False" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Libraries.Data.ViddlerProvider, Telerik.Libraries.Data" tagEditorTemplate="~/Sitefinity/Admin/ControlTemplates/Libraries/BatchTagsEditor.ascx"/>-->
                    <add name="Events" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Title" securityProviderName="" allowVersioning="True" applicationName="/Events" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Events.Data.DefaultEventsProvider, Telerik.Events.Data"/>
                    <add name="Wiki" urlRewriteFormat="[Wiki]/[Name].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" securityProviderName="" allowVersioning="True" applicationName="/Wiki" versioningProviderName="" allowComments="true" commentsModeration="true" connectionStringName="GenericContentConnection" dataFile="~/App_Data/Wikis.xml" type="Telerik.Wiki.Data.XmlProvider, Telerik.Wiki.Data"/>
                    <add name="Jobs" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Title" securityProviderName="" allowVersioning="True" applicationName="/Jobs" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data"/>
                    <add name="Business" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name"  securityProviderName="" allowVersioning="True" applicationName="/Business" versioningProviderName="" allowComments="false" allowWorkflow="false" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"></add>
                    <add name="PayPal" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" securityProviderName="" allowVersioning="True" applicationName="/PayPal" versioningProviderName="" allowComments="false" commentsModeration="true" connectionStringName="GenericContentConnection"  type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"/>
                    <add name="SuspectIP" urlRewriteFormat="[SuspectIP].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="SuspectIP" securityProviderName="" allowVersioning="True" applicationName="/SuspectIP" versioningProviderName="" allowComments="false" allowWorkflow="false" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"></add>
                    <add name="Notification" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" securityProviderName="" allowVersioning="True" applicationName="/Notification" versioningProviderName="" allowComments="false" allowWorkflow="false" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.Cms.Engine.Data.Providers.DefaultProvider, Telerik.Cms.Engine.Data"></add>
     
                </providers>
                <rssProviders>
                    <clear/>
                    <add name="Blogs" type="Telerik.Blogs.RssProvider, Telerik.Blogs" visible="True" applicationName="/Blogs" rssFieldAuthor="Author" rssFieldTitle="Title" rssFieldPubDate="Publication_Date"/>
                </rssProviders>
                <browserCacheSettings lastModifiedDateEnabled="true" contentExpirationEnabled="false">
                    <expirationSettings option="ExpireImmediately" value="0">
                    </expirationSettings>
                </browserCacheSettings>
                <metaFields>
                    <add key="Generic_Content.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="Name this content" mandatory="True"/>
                    <add key="Generic_Content.Description" valueType="LongText" visible="True" searchable="False" sortable="True" defaultValue="Add description here"/>
                    <add key="Generic_Content.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Generic_Content.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="News.Title" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="News.Summary" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="News.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="News.Source" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="News.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/>
                    <add key="News.Expiration_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Max"/>
                    <add key="News.Thumbnail" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="News.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="">
                    </add>
                    <add key="Blogs.Title" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Blogs.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Blogs.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/>
                    <add key="Blogs.BlogID" valueType="Guid" visible="False" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Blogs.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Blogs.View_Count" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue="0"/>
                    <add key="Libraries.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.Width" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.Height" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.Size" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.Extension" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.AlternateText" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.Description" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Libraries.PermaLink" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Events.Title" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Events.Street" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Events.City" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Events.Country" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Events.State" valueType="ShortText" visible="True" searchable="True" sortable="False" defaultValue=""/>
                    <add key="Events.Geomapping_Data" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="Events.Event_Start" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/>
                    <add key="Events.Event_End" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/>
                    <add key="Events.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/>
                    <add key="Events.Expiration_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Max"/>
                    <add key="Events.Contact_Name" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="Events.Contact_Email" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="Events.Contact_Phone" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="Events.Contact_Cell" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="Events.Contact_Web" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="Events.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Wiki.Name" valueType="ShortText" visible="True" searchable="False" sortable="True" defaultValue="HomePage" mandatory="True"/>
                    <add key="Wiki.Wiki" valueType="ShortText" visible="True" searchable="False" sortable="True" defaultValue="DefaultWiki"/>
                    <add key="Wiki.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Wiki.Category" valueType="ShortText" visible="True" searchable="False" sortable="True" defaultValue=""/>
                    <add key="Wiki.DisplayName" valueType="Boolean" visible="False" searchable="False" sortable="False" defaultValue="True"/>
     
     
                    <add key="Jobs.Title" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Jobs.Summary" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Jobs.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Jobs.Source" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Jobs.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now"/>
                    <add key="Jobs.Expiration_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Max"/>
                    <add key="Jobs.Thumbnail" valueType="ShortText" visible="True" searchable="False" sortable="False" defaultValue=""/>
                    <add key="Jobs.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="">
                    </add>
                    <add key="Business.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" mandatory="True" />
                    <add key="Business.PhoneNumber" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" mandatory="True" />
                    <add key="Business.EmailAddress" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.Address" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.City" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.State" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.Zip" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""  />
                    <add key="Business.WebsiteUrl" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.Availability" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.Banner" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.User" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.AdvertisingPlan" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.MapUrl" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.Photo_Hidden" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Business.linkHiddenField" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Business.MyBusinessUrl" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Business.BusinessPageName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="Business" mandatory="True"/>
                    <add key="Business.ItemStatus" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="Published" mandatory="True"/>
     
                    <add key="Business.CCLast4" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.CCExpiresMonth" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.CCExpiresYear " valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.BillingFName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.BillingLName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.BillingEmail" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
     
                    <add key="Business.Slogan" valueType="LongText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.DateInsert" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
                    <add key="Business.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" />
     
                    <add key="PayPal.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.Zip" valueType="Integer" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.UserId" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PaymentFor" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PaymentDate" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.TxnId" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.ParentTxnId" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PaymentStatus" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PendingReason" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.ReasonCode" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.TxnType" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PaymentType" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.McGross" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.McFee" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.McCurrency" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.SettleAmount" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.SettleCurrency" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.ExchangeRate" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PayerEmail" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PayerStatus" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.FirstName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.LastName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.PayerBusinessName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AddressName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AddressStreet" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AddressCity" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AddressState" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
     
                    <add key="PayPal.AddressCountry" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AddressStatus" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.NotifyVersion" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.ForAuction" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AuctionBuyerId" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AuctionClosingDate" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.EnteredDate" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.Ack" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.AckBy" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.Refunded" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.RefundedBy" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="PayPal.RefundReason" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
     
                    <add key="SuspectIP.SuspectIP" valueType="ShortText" visible="True" searchable="True" sortable="True" mandatory="True" defaultValue="IP Address"/>
                    <add key="SuspectIP.UserName" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="SuspectIP.DateCreated" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="SuspectIP.Creator" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
     
                    <add key="Notification.Name" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Notification.Username" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Notification.ContentLinkID" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Notification.Creator" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Notification.CanDelete" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Notification.ExpirationDate" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
                    <add key="Notification.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""/>
     
                </metaFields>
                <contentViewSettings>
                    <add type="Telerik.Cms.Engine.WebControls.Design.Settings.TextSettingService"/>
                    <add type="Telerik.Cms.Engine.WebControls.Design.Settings.ContentSettingService"/>
                    <add type="Telerik.Cms.Engine.WebControls.Design.Settings.MaxWidthSettingService"/>
                </contentViewSettings>
            </cmsEngine>
     
            <business defaultGenericProvider="Business">
                <genericContentProviders>
                    <add providerName="Business" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_" />
                </genericContentProviders>
            </business>
            <notification defaultGenericProvider="Notification">
                <genericContentProviders>
                    <add providerName="Notification" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_"/>
                </genericContentProviders>
            </notification>
            <payPal defaultGenericProvider="PayPal">
                <genericContentProviders>
                    <add providerName="PayPal" urlRewriteFormat="[Name].aspx" urlWhitespaceChar="_"/>
                </genericContentProviders>
            </payPal>
            <news defaultGenericProvider="News">
                <genericContentProviders>
                    <add providerName="News" publicationDateField="Publication_Date" expirationDateField="Expiration_Date" thumbnailUrlField="Thumbnail" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_"/>
                    <add providerName="Jobs" publicationDateField="Publication_Date" expirationDateField="Expiration_Date" thumbnailUrlField="Thumbnail" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_"/>
                </genericContentProviders>
            </news>
            <blogs defaultGenericProvider="Blogs">
                <genericContentProviders>
                    <add providerName="Blogs" publicationDateField="Publication_Date" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" flatOwnership="True"/>
                </genericContentProviders>
            </blogs>
            <libraries defaultGenericProvider="Libraries">
                <genericContentProviders>
                    <add providerName="Libraries" publicationDateField="Publication_Date"/>
                </genericContentProviders>
                <libraryInfo>
                    <add name="Image" title="Image Library" defaultExtenstions=".png, .jpg, .jpeg, .gif" metaKeys="Author, AlternateText, Extension, Name, Height, Width, Size, Category">
                    </add>
                    <add name="Document" title="Document Library" defaultExtenstions=".doc, .docx, .rtf, .txt, .pdf, .ppt, .pps, .pptx, .html, .xls, .xlsx" metaKeys="Author, Description, Extension, Name, Size, Category">
                    </add>
                    <add name="Custom" title="Custom Library" defaultExtenstions=".*" metaKeys="Author, Description, Extension, Name, Size, Category">
                    </add>
                    <add name="Video" title="Video" defaultExtenstions=".wmv" metaKeys="Author, Extension, Name, Size, Category, Description">
                    </add>
                    <!-- Viddler can co-exists with other libraries-->
                    <!--<add name="Viddler" title="Viddler Library" defaultExtenstions=".avi, .mpg, .mov, .wmv, .wma, .3gp" metaKeys="Author, Description, Extension, Name, Size, Category"></add>-->
                </libraryInfo>
                <!-- before using extensionMapping be you uncomment LibraryHttpModule in handlers and httpHandlers sections -->
                <extensionMapping defaultExtension=".sflb.ashx">
                    <!--<add key=".jpg"/>
                    <add key=".pdf"/>
                    <add key=".csv"/>
                    <add key=".xls"/>-->
                </extensionMapping>
            </libraries>
            <events defaultGenericProvider="Events" liveSearchMapsAPIUrl="http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2">
                <genericContentProviders>
                    <add providerName="Events" publicationDateField="Publication_Date"
         expirationDateField="Expiration_Date" eventStartField="Event_Start"
         eventEndField="Event_End" streetField="Street" cityField="City"
         countryField="Country" stateField="State" geomappingDataField="Geomapping_Data"
         urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd"
         urlWhitespaceChar="_" />
                </genericContentProviders>
            </events>
            <wiki defaultGenericProvider="Wiki" defaultProvider="SitefinityXml">
                <genericContentProviders>
                    <add providerName="Wiki" urlRewriteFormat="[Wiki]/[Name].aspx" urlWhitespaceChar="_"/>
                </genericContentProviders>
            </wiki>
     
            <suspectIP defaultGenericProvider="SuspectIP">
                <genericContentProviders>
                    <add providerName="SuspectIP" urlRewriteFormat="[SuspectIP].aspx" urlWhitespaceChar="_"/>
                </genericContentProviders>
            </suspectIP>
     
     
            <workflow deleteOnCompletion="true" defaultProvider="NolicsWorkflowProvider">
                <providers>
                    <clear/>
                    <add name="NolicsWorkflowProvider" connectionStringName="DefaultConnection" type="Telerik.Workflow.NolicsWorkflowProvider, Telerik.Workflow"/>
                </providers>
            </workflow>
            <polls defaultProvider="NolicsPollsProvider">
                <providers>
                    <clear/>
                    <add name="NolicsPollsProvider" connectionStringName="DefaultConnection" type="Telerik.Polls.Data.NolicsPollsProvider, Telerik.Polls.Data"/>
                </providers>
            </polls>
            <fileManager defaultProvider="Sitefinity">
                <impersonation username="" password="">
                    <allow roles="Administrators">
                    </allow>
                </impersonation>
                <providers>
                    <clear/>
                    <add name="Sitefinity" type="Telerik.FileManager.DefaultProvider, Telerik.FileManager"/>
                </providers>
            </fileManager>
            <personalization defaultProvider="Sitefinity">
                <providers>
                    <clear/>
                    <add name="Sitefinity" type="Telerik.Personalization.Data.NolicsProvider, Telerik.Personalization.Data" connectionStringName="DefaultConnection"/>
                </providers>
                <globalSettings>
                    <add type="Telerik.Cms.Web.UI.Personalization.GeneralSettingPanel, Telerik.Cms" templatePath="~/Sitefinity/Admin/ControlTemplates/Personalization/GeneralSettings.ascx" order="1"/>
                    <add type="Telerik.Cms.Web.UI.Personalization.DashboardSettingPanel, Telerik.Cms" templatePath="~/Sitefinity/Admin/ControlTemplates/Personalization/DashboardSettings.ascx" order="2"/>
                    <add type="Telerik.Cms.Web.UI.Personalization.PageEditorSettingPanel, Telerik.Cms" templatePath="~/Sitefinity/Admin/ControlTemplates/Personalization/PageEditorSettings.ascx" order="3"/>
                </globalSettings>
                <dashboardVisibilitySettings>
                    <add key="showMyLatestChanges" value="true"/>
                    <add key="showLastModifiedPages" value="true"/>
                    <add key="showNewUsers" value="false"/>
                    <add key="showLastModifiedBlogs" value="false"/>
                    <add key="showLastModifiedBlogPosts" value="false"/>
                    <add key="showLastModifiedNews" value="false"/>
                    <add key="showLastModifiedForums" value="false"/>
                    <add key="showNewForumPosts" value="false"/>
                    <add key="showLastModifiedLists" value="false"/>
                    <add key="showLastModifiedContents" value="false"/>
                </dashboardVisibilitySettings>
            </personalization>
            <spamProtector defaultProvider="akismet" disabled="true">
                <providers>
                    <add name="akismet" type="Telerik.Cms.Engine.SpamProtector.AkismetProvider" key="c0e8868fd509" siteUrl="http://www.telerik.com/"/>
                </providers>
            </spamProtector>
            <performanceCounter category="Sitefinity CMS" description="Sitefinity performance statistics" disabled="true">
                <counters>
                    <add name="DAL Operations/Sec" description="The number database calls made per second." type="RateOfCountsPerSecond32"/>
                    <add name="Error Raised" description="Number of times excpetion has been thrown running the app" type="NumberOfItems32"/>
                    <add name="CMS Page Average Execution Time" description="The average time consumed to serve Sitefinity pages measured in milliseconds." type="AverageTimer32"/>
                    <add name="CMS Content Average Execution Time" description="The average time consumed to serve Sitefinity Content measured in milliseconds." type="AverageTimer32"/>
                    <add name="Average Operation Execution Time" description="The average time to execute an operaion (CRUD) measured in milliseconds." type="AverageTimer32"/>
                </counters>
            </performanceCounter>
            <storageSetting defaultProvider="Amazon">
                <providers>
                    <add name="Amazon" type="Telerik.Libraries.AmazonStorage.AmazonStorageProvider, Telerik.Libraries" downloadUrlPrefix="http://s3.amazonaws.com" accessKey="#YourAccessKey#" secretAccessKey="#YourSecrectKey#" bucketName="Sitefinity"/>
                </providers>
            </storageSetting>
            <!-- Viddler-->
            <mediaProvider defaultProvider="viddler">
                <providers>
                    <add name="viddler" type="Telerik.Libraries.MediaProvider.ViddlerProvider" apiKey="#Your_Api#" baseUrl="http://api.viddler.com/rest/v1/"/>
                </providers>
            </mediaProvider>
     
            <urlrewrites>
                <rule >
                    <url>/user/(.*).aspx</url>
                    <rewrite>UserProfile.aspx?user=$1</rewrite>
                </rule>
            </urlrewrites>
        </telerik>
     
        <MailChimpAPIconfig>
            <MCAPI SecureAccess="False" Validate="False" DataCenter="us2" apikey="e20d8571774eb76b8f58bf1d6970de8e-us2"  />
     
        </MailChimpAPIconfig>
     
    </configuration>


    Regards,
    Tarun
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    20 Jan 2011
    Link to this post
    Hi Tarun,

    'Sys' is undefined" error is related to any MS AJAX application. Sys is the root namespace for all MS AJAX client classes, so this error is common if you have not properly loaded the MS AJAX libraries. Since we use MS AJAX everywhere this affects our scripts as well and multiple errors are thrown. You could also take a look at



    You could use Fiddler to see what you're getting from the server. Check whether some scripts are not loaded and blocked somehow.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    21 Jan 2011
    Link to this post
    Thank You Ivan!

    I checked and made some test pages for this.Below are two links,one of then is working with ajax and other one is not worked. 

    Check below link I have a user control(.ascx) on this page where ajax work fine.

    http://sf.sacitportal.com/testbusiness/testbusiness2.aspx

    but this same code(ajax) is not working in ContentView control (inside a module), check below link.

    http://sf.sacitportal.com/News.aspx


    I need to get this working in custom module for contentview control(inside a class library).

    Regards,
    Tarun
  8. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    27 Jan 2011
    Link to this post
    Hi Tarun,

    Can you please send the code you have used in the control which has worked and the one which does not?

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Tarun
    Tarun avatar
    81 posts
    Registered:
    14 Jan 2009
    27 Jan 2011
    Link to this post
    Hi Radoslav Georgiev,

    I made few more attempt and got ajax working but still have some issue. On first postback(button click) the ajax does not work but after first postback this works.

    Second issue on menu, I used some code on ItemDataBound event of menu control to populate images in item template which work fine on first page load but after ajax call the menu item images does not come. 

    Third issue, ajax loading panel(animated image/processing text...) does not comes.

    Check below link for live results and attached code for the page
    http://sf.sacitportal.com/Business.aspx

    This is Template page

    <%@ Control Language="C#" AutoEventWireup="true" %>
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Engine.WebControls" Assembly="Telerik.Cms.Engine" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Engine.WebControls.Admin" Assembly="Telerik.Cms.Engine" %>
    <%@ Register TagPrefix="sf" Namespace="Telerik.Cms.Web.UI" Assembly="Telerik.Cms.Web.UI" %>
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="cc2" Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" %>
    <%@ Register TagPrefix="cc2" Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls" %>
    <%@ Register TagPrefix="cc2" Namespace="Telerik.Libraries.WebControls" Assembly="Telerik.Libraries" %>
    <%@ Register TagPrefix="sfLib" Namespace="Telerik.Libraries.WebControls" Assembly="Telerik.Libraries" %>
    <%@ Register TagPrefix="sfLib" Namespace="Telerik.Cms.Engine.WebControls" Assembly="Telerik.Cms.Engine" %>
    <%@ Register TagPrefix="sfLib" Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls.Design" %>
    <%@ Register TagPrefix="sfLib" Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls.Design.Settings" %>
    <%@ Register TagPrefix="sfLib" Assembly="Telerik.Cms.Engine" Namespace="Telerik.Cms.Engine.WebControls.Design.Selectors" %>
    <%@ Register TagPrefix="sfLib" Assembly="Telerik.Libraries" Namespace="Telerik.Libraries.WebControls.Admin" %>
    <%@ Register TagPrefix="sfWeb" Assembly="Telerik.Cms.Web.UI" Namespace="Telerik.Cms.Web.UI" %>
    <%@ Register Assembly="Telerik.Search" Namespace="Telerik.Search.WebControls" TagPrefix="sfSrcBx" %>
    <%@ Register Assembly="InstantCommunity.Sitefinity.Controls.CustomCategory" Namespace="InstantCommunity.Sitefinity.Controls"
        TagName="CustomCategory" TagPrefix="InstantCommunity" %>
     
    <script type="text/javascript">
     
        function ClearText() {
            var lblMessage = document.getElementById("<%=lblMessage.ClientID %>");
            lblMessage.innerHTML  = "";
            $find("<%= txtSearch.ClientID %>").clear();
            document.getElementById("<%=searchcontentDiv.ClientID %>").style.display = 'none';
            document.getElementById("<%=clearBtnDiv.ClientID %>").style.visibility = 'hidden';
            var combo = $find("<%=comboCustomCategory.ClientID %>");
           combo.ClearSelection();
     
     
        }
     
        function GetClearButton(sender, eventArgs) {
            document.getElementById("<%=clearBtnDiv.ClientID %>").style.visibility = 'visible';
            if ($find("<%= txtSearch.ClientID %>").value == "" || $find("<%= txtSearch.ClientID %>").value == 'null') {
                document.getElementById("<%=clearBtnDiv.ClientID %>").style.visibility = 'hidden';
            }
        }
    </script>
     
    <telerik:RadAjaxLoadingPanel runat="server" ID="LoadingPanel1" Skin="Sitefinity">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel runat="server" ID="AjaxPanel1">
        <asp:Panel ID="pnlContentMain" runat="server">
            <asp:Label ID="lblMessage" runat="server"></asp:Label><asp:Button ID="temp" Visible="false"
                runat="server" Text="Temp" />
            <table>
                <tr>
                    <td style="vertical-align: top;">
                        <table>
                            <tr>
                                <td>
                                     
                                    <table style="background: white;border:1px solid #000011;"  cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="border-right:0px;" valign="top" >
                                                <telerik:RadTextBox ID="txtSearch"  BorderWidth="0" Width="107" ClientEvents-OnKeyPress="GetClearButton"
                                                    EmptyMessage="Keywork search..." runat="server" style="margin:0px 0px 0px 0px;" >
                                                </telerik:RadTextBox>
                                            </td>
                                            <td style="border-left:0px;" valign="top">
                                            <div id="clearBtnDiv" runat="server" style="visibility:hidden;margin:0px 0px 0px 0px;" >
                                                 
                                                <a  id="clearBtn" href="#"  style="background:white;border:0px;" onclick="ClearText(); return false;">?</a>
                                                </div>
                                            </td>
                                            <td style="border-left:0px;" valign="top">
                                                <asp:Button ID="btnGo" Text="GO" style="border:0px;"   runat="server" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                    </tr>
                    <tr>
                        <td>
                            
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <%--
                                  
                                                    <InstantCommunity:CustomCategory ID="comboCustomCategory" runat="server" Provider="Business"></InstantCommunity:CustomCategory>
    --%>
                            <telerik:RadComboBox ID="comboCustomCategory" AutoPostBack="true" runat="server">
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                        </td>
                    </tr>
                    </table> </td>
                    <td>
                        <asp:HyperLink ID="backLink" runat="server" Text="GoBack"></asp:HyperLink>
                        <div style="min-height:300px;">
                        <asp:Panel ID="searchcontentDiv" runat="server" Style="display: block;">
                            <asp:Panel ID="sortDiv" runat="server">
                                <table>
                                    <thead>
                                        <tr>
                                            <th scope="col">
                                                <asp:LinkButton ID="lnkName" runat="server" Text="Name" ToolTip="Sort" CommandName="Name"></asp:LinkButton>     
                                            </th>
                                            <th scope="col">
                                                <asp:LinkButton ID="lnkDateCreated" runat="server" Text="Date" ToolTip="Sort" CommandName="DateCreated"></asp:LinkButton>
                                            </th>
                                        </tr>
                                    </thead>
                                </table>
                            </asp:Panel>
                            <div>
                                <telerik:RadGrid ID="catGrid" CellSpacing="0" GridLines="None" BorderWidth="0" Width="550"
                                    runat="server" ShowHeader="false" ShowFooter="false" AllowSorting="true" AutoGenerateColumns="false">
                                    <MasterTableView>
                                        <Columns>
                                            <telerik:GridTemplateColumn>
                                                <ItemTemplate>
                                                    <strong>
                                                        <asp:HyperLink NavigateUrl='<%# Eval("Url")%>' ID="fullContent1" runat="server" Text='<%# Eval("Name")%>'></asp:HyperLink></strong><br />
                                                    <asp:Label ID="lblSnippet" runat="server" Text='<%# Eval("Snippet") %>'></asp:Label><br />
                                                    <asp:Label ID="Label1" runat="server" Text='<%# Eval("PhoneNumber") %>'></asp:Label><br />
                                                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("EmailAddress") %>'></asp:Label><br />
                                                    <asp:HyperLink ID="lnkWebsiteUrl" runat="server" NavigateUrl='<%# Eval("WebsiteUrl")%>'
                                                        Text='<%# Eval("WebsiteUrl") %>'></asp:HyperLink><br />
                                                    <asp:Literal ID="Literal1" Text='<%#Eval("DateCreated") %>' runat="server"></asp:Literal><br />
                                                    <asp:Literal ID="Literal2" Text='<%#Eval("Creator") %>' runat="server"></asp:Literal>
                                                </ItemTemplate>
                                            </telerik:GridTemplateColumn>
                                        </Columns>
                                    </MasterTableView>
                                </telerik:RadGrid>
                            </div>
                        </asp:Panel>
                        </div>
                    </td>
                </tr>
            </table>
        </asp:Panel>
    </telerik:RadAjaxPanel>
    <asp:Repeater ID="repeater" runat="server" EnableViewState="False">
    </asp:Repeater>


    Below is contentView control cs page

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Telerik.Cms.Engine.WebControls;
    using System.ComponentModel;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Collections;
    using Telerik.Cms.Engine;
    using System.Web;
    using Telerik.Framework.Web;
    using Telerik.Cms.Web.UI;
    using Telerik.Cms.Engine.ContentViewFiltering;
    using Telerik.Web.UI;
    using Telerik.Search.Engine;
    using InstantCommunity.Sitefinity.Controls;
    using System.Web.UI.HtmlControls;
    namespace InstantCommunity.Sitefinity.Modules.Business.WebControls
    {
        public class BusinessListSearchable : ContentView
        {
            private const string BusinessLitsTemplateName = "InstantCommunity.Sitefinity.Modules.Business.Resources.ControlTemplates.Frontend.BusinessListSearchable.ascx";
            private const string BusinessSingleItemTemplateName = "InstantCommunity.Sitefinity.Modules.Business.Resources.ControlTemplates.Frontend.BusinessSingleItem.ascx";
     
            /// <summary>
            /// If this property is empty the control will try to detect if a provider is specified in the request or it will use the default provider.
            /// </summary>
            /// <value></value>
            public override string ProviderName
            {
                get
                {
                    object obj = ViewState["ProviderName"];
                    if (obj != null)
                        return (string)obj;
                    return BusinessManager.DefaultContentProvider;
                }
                set
                {
                    ViewState["ProviderName"] = value;
                }
            }
     
            public override string ItemListTemplateName
            {
                get
                {
                    return BusinessListSearchable.BusinessLitsTemplateName;
                }
            }
     
            [WebSysTemplate(BusinessListSearchable.BusinessLitsTemplateName, "BusinessLitsTemplateName", "/Bsuiness", true, "2009-02-17")]
            public override string ItemListTemplatePath
            {
                get
                {
                    return base.ItemListTemplatePath;
                }
                set
                {
                    base.ItemListTemplatePath = value;
                }
            }
     
            public override string SingleItemTemplateName
            {
                get
                {
                    return BusinessListSearchable.BusinessSingleItemTemplateName;
                }
            }
     
            [WebSysTemplate(BusinessListSearchable.BusinessSingleItemTemplateName, "BusinessSingleItemTemplateName", "/Business", true, "2009-02-17")]
            public override string SingleItemTemplatePath
            {
                get
                {
                    return base.SingleItemTemplatePath;
                }
                set
                {
                    base.SingleItemTemplatePath = value;
                }
            }
     
     
            protected override void OnInit(EventArgs e)
            {
     
                //RadAjaxManager ajaxManager = RadAjaxManager.GetCurrent(Page);
                //if (ajaxManager != null)
                //{
     
                //    ajaxManager.AjaxSettings.AddAjaxSetting(this.AjaxPanel1, this.PnlContentMain, this.LoadingPanel1);
                //}
                //base.OnInit(e);
            }
     
     
             
            protected void SiteFinityImage_PreRender(object sender, EventArgs e)
            {
                //HttpContext.Current.Response.Write("prerender");
                ////Use pre render event to get Alt Text. If ImageUrl is bound to a dataItem in a RadGrid then the code below must be called in Pre Render. If you try to do in PageLoad the this.ImageUrl is not populated yet.          
                ////debug
                ////HttpContext.Current.Response.Write(this.ImageUrl);
     
                //#region Assign Alternate Text to the image
     
                ////if (!string.IsNullOrEmpty(CategoryCombo.Text))
                ////{
                //    SortPanel.Visible = true;
                //    CatGrid.DataSource = null;
                //    CatGrid.DataBind();
                //    Search.Text = "";
                //    DateTo.SelectedDate = null;
                //    Date_From.SelectedDate = null;
     
                //    IList filteredList = new List<IContent>();
     
                //    int i = 0;
                //    IList list = new List<IContent>();
                //    list = CategoryCombo.CategoryDataSource;
                //    if (list != null)
                //    {
                //        foreach (IContent content in list)
                //        {
                //            SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                //            _searchResultCustom.Name = content.GetMetaData("Name").ToString();
                //            _searchResultCustom.Score = float.NaN;
                //            _searchResultCustom.Snippet = "";
     
                //            _searchResultCustom.PhoneNumber = content.GetMetaData("PhoneNumber").ToString();
                //            _searchResultCustom.EmailAddress = content.GetMetaData("EmailAddress").ToString();
                //            _searchResultCustom.WebsiteUrl = content.GetMetaData("WebsiteUrl").ToString();
                //            _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), content.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                //            _searchResultCustom.DateCreated = content.DateCreated;
                //            _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(content)).Owner.ToString();
                //            //list.Add(_searchResultCustom);
                //            filteredList.Add(content);
                //        }
     
                //        CatGrid.DataSource = filteredList;
                //        CatGrid.DataBind();
                //    }
                ////}
     
                //#endregion
     
            }
            protected override void CreateChildControls()
            {
     
                base.CreateChildControls();
     
                SearchContentDiv.Visible = true;
     
                ContentManager cntManager = new ContentManager(ProviderName.ToString());
     
                bool isAdmin = false;
                string username = HttpContext.Current.User.Identity.Name;
                Telerik.Security.UserManager user = new Telerik.Security.UserManager();
                isAdmin = user.IsUserInRole(username, "administrators");
     
                CatGrid.ItemDataBound += new GridItemEventHandler(ItemDataBound);
     
                CategoryCombo.ItemsRequested += new RadComboBoxItemsRequestedEventHandler(RadComboBox1_ItemsRequested);
                CategoryCombo.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(RadComboBox1_SelectedIndexChanged);
     
                CategoryCombo.EmptyMessage = "Select category...";
                CategoryCombo.EnableLoadOnDemand = true;
                CategoryCombo.ShowMoreResultsBox = true;
                CategoryCombo.EnableVirtualScrolling = true;
                CategoryCombo.MarkFirstMatch = true;
                CategoryCombo.Filter = RadComboBoxFilter.Contains;
                CategoryCombo.AutoPostBack = true;
     
                //CategoryCombo.EnableAutomaticLoadOnDemand = true;
     
     
                //Bind page load
                if (!this.Page.IsPostBack && this.Page != null)//&& !HttpContext.Current.Request.Url.PathAndQuery.Contains("IndexCatalogue="))
                {
                    if (isAdmin)
                    {
                        CatGrid.DataSource = GetData();
                        CatGrid.DataBind();
                    }
                    else
                    {
     
                        CatGrid.DataSource = GetPublishedData();
                        CatGrid.DataBind();
                    }
                }
     
     
     
                LinkButton btn = ListContainer.GetControl<LinkButton>("lnkName", true);
     
                if (btn != null)
                {
                    btn.Command += new CommandEventHandler(btn_Command);
     
                }
     
                LinkButton lnkDateCreated = ListContainer.GetControl<LinkButton>("lnkDateCreated", true);
     
                if (lnkDateCreated != null)
                {
                    lnkDateCreated.Command += new CommandEventHandler(lnkDateCreated_Command);
     
                }
     
     
                SortPanel.Visible = true;
     
                BtnGo.Click += new EventHandler(btnGo_Click);
                //Temp.Click += new EventHandler(Temp_Click);
     
                ListContainer.DataBind();
     
            }
     
     
            bool _isAdmin = false;
            protected bool IsAdmin
            {
                get
                {
                    string username = HttpContext.Current.User.Identity.Name;
                    Telerik.Security.UserManager user = new Telerik.Security.UserManager();
                    _isAdmin = user.IsUserInRole(username, "administrators");
                    return _isAdmin;
                }
     
            }
     
     
            
     
     
            #region Property
            protected Button Temp
            {
                get { return ListContainer.GetControl<Button>("temp", true); }
            }
     
            /// <summary>
            /// Message label
            /// </summary>
            protected Label Message
            {
                get { return ListContainer.GetControl<Label>("lblMessage", true); }
            }
     
     
            /// <summary>
            /// Search textbox
            /// </summary>
            protected RadTextBox Search
            {
                get { return ListContainer.GetControl<RadTextBox>("txtSearch", true); }
            }
     
            //protected Button ClearButton
            //{
            //    get { return ListContainer.GetControl<Button>("xbtn", true); }
            //}
     
            /// <summary>
            /// Search button
            /// </summary>
            protected Button BtnGo
            {
                get { return ListContainer.GetControl<Button>("btnGo", true); }
            }
     
            protected Button DataSearchButton
            {
                get { return ListContainer.GetControl<Button>("btnDataSearch", true); }
            }
     
            /// <summary>
            /// Clear button div
            /// </summary>
            protected HtmlGenericControl ClearButton
            {
                get { return ListContainer.GetControl<HtmlGenericControl>("clearBtnDiv", true); }
            }
     
     
            //protected RadDatePicker Date_From
            //{
            //    get { return ListContainer.GetControl<RadDatePicker>("calFrom", true); }
            //}
            //protected RadDatePicker DateTo
            //{
            //    get { return ListContainer.GetControl<RadDatePicker>("calTo", true); }
            //}
     
            /// <summary>
            /// grid panel
            /// </summary>
            protected Panel SearchContentDiv
            {
                get { return ListContainer.GetControl<Panel>("searchcontentDiv", true); }
            }
     
            /// <summary>
            /// grid
            /// </summary>
            protected RadGrid CatGrid
            {
                get { return ListContainer.GetControl<RadGrid>("catGrid", true); }
            }
     
            /// <summary>
            /// sort panel for name and date link
            /// </summary>
            protected Panel SortPanel
            {
                get { return ListContainer.GetControl<Panel>("sortDiv", true); }
            }
     
            /// <summary>
            /// Ajax panel for all view content
            /// </summary>
            protected Panel PnlContentMain
            {
                get { return ListContainer.GetControl<Panel>("pnlContentMain", true); }
     
            }
     
            protected RadAjaxPanel AjaxPanel1
            {
                get { return ListContainer.GetControl<RadAjaxPanel>("AjaxPanel1", true); }
     
            }
     
            /// <summary>
            /// Ajax loading panel
            /// </summary>
            protected RadAjaxLoadingPanel LoadingPanel1
            {
                get { return ListContainer.GetControl<RadAjaxLoadingPanel>("LoadingPanel1", true); }
     
            }
     
            /// <summary>
            /// Combobox for categories
            /// </summary>
            protected RadComboBox CategoryCombo
            {
                get
                {
                    return ListContainer.GetControl<RadComboBox>("comboCustomCategory", true);
     
                }
            }
     
            #endregion
     
            protected void ItemDataBound(object sender, GridItemEventArgs e)
            {
                GridItem item = e.Item;
                if (e.Item.ItemType == GridItemType.AlternatingItem || e.Item.ItemType == GridItemType.Item)
                {
                    
                    if (string.IsNullOrEmpty(Search.Text))
                    {
                        Label lblSnippet = item.FindControl("lblSnippet") as Label;
                        lblSnippet.Style.Add("display", "none");
                    }
                    
                }
            }
     
            protected void CatGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
            {
                if (!string.IsNullOrEmpty(Search.Text))
                {
     
                    CatGrid.DataSource = GetSearchDataSource();
     
                }
                else
                {
                    CatGrid.DataSource = GetNonSearchDataSource();
     
                }
     
            }
     
            protected bool IsGuid(string id)
            {
                try
                {
                    Guid guid = new Guid(id);
                    return true;
     
                }
                catch
                {
                    return false;
     
                }
            }
     
            protected void Temp_Click(object sender, EventArgs e)
            {
                Message.Text = "MessageServerAjax";
            }
     
            protected void btnGo_Click(object sender, EventArgs e)
            {
                // keyword search
                if (!string.IsNullOrEmpty(Search.Text))
                {
                    SortPanel.Visible = false;
                    ClearButton.Style.Add("visibility", "visible");
     
                    CatGrid.DataSource = GetSearchDataSource();
                    CatGrid.DataBind();
                }
                else // category search
                {
                    ClearButton.Style.Add("visibility", "hidden");
     
                    SortPanel.Visible = true;
                    CatGrid.DataSource = GetNonSearchDataSource();
                    CatGrid.DataBind();
     
                }
            }
     
            protected void ClearButton_Click(object sender, EventArgs e)
            {
                Search.Text = "";
                //Search.Text = "Keyword"
                //CategoryCombo.SelectedItem.Text = "";
                //if (IsAdmin)
                //{
     
                //    //ListContainer.RepeaterControl.ItemDataBound += new RepeaterItemEventHandler(ItemDataBound);
                //    // ListContainer.RepeaterControl.DataSource = GetData();
                //    CatGrid.DataSource = GetData();
                //    CatGrid.DataBind();
                //}
                //else
                //{
                //    // ListContainer.RepeaterControl.DataSource = GetPublishedData();
                //    CatGrid.DataSource = GetPublishedData();
                //    CatGrid.DataBind();
                //}
            }
     
            /// <summary>
            /// Create keyword search datasource.
            /// </summary>
            /// <returns>list of SearchResultCustomClass</returns>
            public List<SearchResultCustomClass> GetSearchDataSource()
            {
                int i = 0;
                int totalItems = 0;
                
                // get search data for the keyword
                IList<ResultItem> CustomDataSource = SearchManager.Search(
                                               Search.Text,
                                               "BusinessIndex",
                                               0,
                                               int.MaxValue,
                                               HttpContext.Current.Request.QueryString["WordsMode"],
                                               true,
                                               out totalItems);
                
                List<SearchResultCustomClass> list = new List<SearchResultCustomClass>();
                List<Telerik.Cms.Engine.IMetaSearchInfo> filter = new List<Telerik.Cms.Engine.IMetaSearchInfo>();
                
                if (CustomDataSource != null)
                {
                    foreach (Telerik.Search.Engine.ResultItem resultITem in CustomDataSource)
                    {
                        try
                        {
     
                            string value = resultITem.Snippet;
                            string ID = value.Substring(0, 36);
                            if (IsGuid(ID))
                            {
     
                                IContent content = manager.GetContent(new Guid(ID));
                                if (content != null)
                                {
     
                                    //if keyword found then check for category if selected. category search + keyword
                                    if (!string.IsNullOrEmpty(CategoryCombo.Text))
                                    {
                                        Message.Text = "Found " + i.ToString() + " content(s) for " + Search.Text + " and category \"" + CategoryCombo.SelectedValue + "\"";
     
                                        if (content.GetMetaData("Category") != null)
                                        {
                                            if (content.GetMetaData("Category").ToString() == CategoryCombo.SelectedValue)
                                            {
     
                                                SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                                                _searchResultCustom.Name = content.GetMetaData("Name").ToString();
                                                _searchResultCustom.Score = resultITem.Score;
                                                _searchResultCustom.Snippet = resultITem.Snippet;
     
                                                _searchResultCustom.WebsiteUrl = content.GetMetaData("WebsiteUrl").ToString();
                                                _searchResultCustom.PhoneNumber = content.GetMetaData("PhoneNumber").ToString();
                                                _searchResultCustom.EmailAddress = content.GetMetaData("EmailAddress").ToString();
                                                _searchResultCustom.Url = resultITem.Url;
                                                _searchResultCustom.DateCreated = content.DateCreated;
                                                _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(content)).Owner.ToString();
                                                list.Add(_searchResultCustom);
     
                                                i++;
                                                Message.Text = "Found " + i.ToString() + " content(s) for " + Search.Text + " and category \"" + CategoryCombo.SelectedValue + "\"";
                                            }
                                            else if (CategoryCombo.SelectedValue.ToLower() == "all category")
                                            {
                                                SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                                                _searchResultCustom.Name = content.GetMetaData("Name").ToString();
                                                _searchResultCustom.Score = resultITem.Score;
                                                _searchResultCustom.Snippet = resultITem.Snippet;
                                                _searchResultCustom.WebsiteUrl = content.GetMetaData("WebsiteUrl").ToString();
                                                _searchResultCustom.PhoneNumber = content.GetMetaData("PhoneNumber").ToString();
                                                _searchResultCustom.EmailAddress = content.GetMetaData("EmailAddress").ToString();
                                                _searchResultCustom.Url = resultITem.Url;
                                                _searchResultCustom.DateCreated = content.DateCreated;
                                                _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(content)).Owner.ToString();
                                                list.Add(_searchResultCustom);
     
                                                i++;
                                                Message.Text = "Found " + i.ToString() + " content(s) for " + Search.Text + " in All category ";
     
                                            }
     
     
                                        }
                                    }
                                    else // if category is not selected
                                    {
                                        SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                                        _searchResultCustom.Name = content.GetMetaData("Name").ToString();
                                        _searchResultCustom.Score = resultITem.Score;
                                        _searchResultCustom.Snippet = resultITem.Snippet;
                                        _searchResultCustom.WebsiteUrl = content.GetMetaData("WebsiteUrl").ToString();
                                        _searchResultCustom.PhoneNumber = content.GetMetaData("PhoneNumber").ToString();
                                        _searchResultCustom.EmailAddress = content.GetMetaData("EmailAddress").ToString();
                                        _searchResultCustom.Url = resultITem.Url;
                                        _searchResultCustom.DateCreated = content.DateCreated;
                                        _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(content)).Owner.ToString();
                                        list.Add(_searchResultCustom);
     
                                        i++;
                                        Message.Text = "Found " + i.ToString() + " content(s) for " + Search.Text;
                                    }
                                }
                            }
     
     
                        }
                        catch { }
                    }
                }
                return list;
     
            }
     
            /// <summary>
            /// Create category search datasource.
            /// </summary>
            /// <returns></returns>
            public List<SearchResultCustomClass> GetNonSearchDataSource()
            {
                Message.Text = "";
                ContentManager cntManager = new ContentManager(ProviderName.ToString());
                List<SearchResultCustomClass> list = new List<SearchResultCustomClass>();
                List<Telerik.Cms.Engine.IMetaSearchInfo> filter = new List<Telerik.Cms.Engine.IMetaSearchInfo>();
                IList listContent = new List<IContent>();
                int i = 0;
                if (string.IsNullOrEmpty(CategoryCombo.Text))
                {
                    listContent = cntManager.GetContent("DateCreated DESC");
                }
                else
                {
                    filter.Add(new MetaSearchInfo(MetaValueTypes.ShortText, "Category", CategoryCombo.SelectedValue.ToString()));
                    listContent = cntManager.GetContent("DateCreated DESC", filter.ToArray());
                }
     
     
                foreach (IContent content in listContent)
                {
     
                    // check category
                    if (!string.IsNullOrEmpty(CategoryCombo.Text))
                    {
                        if (content.GetMetaData("Category") != null)
                        {
                            Message.Text = "Found " + i.ToString() + " content(s) for " + CategoryCombo.SelectedValue;
     
                            if (content.GetMetaData("Category").ToString() == CategoryCombo.SelectedValue)
                            {
     
                                SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                                _searchResultCustom.Name = content.GetMetaData("Name").ToString();
                                _searchResultCustom.Score = float.NaN;
                                _searchResultCustom.Snippet = "";
                                _searchResultCustom.WebsiteUrl = content.GetMetaData("WebsiteUrl").ToString();
                                _searchResultCustom.PhoneNumber = content.GetMetaData("PhoneNumber").ToString();
                                _searchResultCustom.EmailAddress = content.GetMetaData("EmailAddress").ToString();
                                _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), content.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                                _searchResultCustom.DateCreated = content.DateCreated;
                                _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(content)).Owner.ToString();
                                list.Add(_searchResultCustom);
     
                                i++;
                                Message.Text = "Found " + i.ToString() + " content(s) for " + CategoryCombo.SelectedValue;
                            }
     
                        }
                    }
                    else // used for sorting
                    {
                        SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                        _searchResultCustom.Name = content.GetMetaData("Name").ToString();
                        _searchResultCustom.Score = float.NaN;
                        _searchResultCustom.Snippet = "";
                        _searchResultCustom.WebsiteUrl = content.GetMetaData("WebsiteUrl").ToString();
                        _searchResultCustom.PhoneNumber = content.GetMetaData("PhoneNumber").ToString();
                        _searchResultCustom.EmailAddress = content.GetMetaData("EmailAddress").ToString();
                        _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), content.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                        _searchResultCustom.DateCreated = content.DateCreated;
                        _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(content)).Owner.ToString();
                        list.Add(_searchResultCustom);
     
                        i++;
                        Message.Text = "Found " + i.ToString() + " content(s)";
     
                    }
                }
     
     
                return list;
            }
     
     
            /// <summary>
            /// get data on first page load if admin
            /// </summary>
            /// <returns></returns>
            public List<SearchResultCustomClass> GetData()
            {
                Message.Text = "";
                IList iList = null;
     
                List<SearchResultCustomClass> list = new List<SearchResultCustomClass>();
                try
                {
     
                    BusinessManager manager = new BusinessManager("Business");
                    iList = manager.Content.GetContent();
     
                    foreach (IContent item in iList)
                    {
                        if (item.Status != ContentStatus.Archived)
                        {
     
                            SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                            _searchResultCustom.Name = item.GetMetaData("Name").ToString();
                            _searchResultCustom.Score = float.NaN;
                            _searchResultCustom.Snippet = "";
     
                            _searchResultCustom.PhoneNumber = item.GetMetaData("PhoneNumber").ToString();
                            _searchResultCustom.EmailAddress = item.GetMetaData("EmailAddress").ToString();
                            _searchResultCustom.WebsiteUrl = item.GetMetaData("WebsiteUrl").ToString();
                            _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), item.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                            _searchResultCustom.DateCreated = item.DateCreated;
                            _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(item)).Owner.ToString();
                            list.Add(_searchResultCustom);
     
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                return list;
     
            }
     
            public List<SearchResultCustomClass> GetPublishedData()
            {
                Message.Text = "";
                Guid[] pid = null;
                IList iList = null;
                List<SearchResultCustomClass> list = new List<SearchResultCustomClass>();
     
                try
                {
                    BusinessManager manager = new BusinessManager("Business");
                    iList = manager.Content.GetContent(0, int.MaxValue, "", ContentStatus.Published, pid);
     
                    foreach (IContent item in iList)
                    {
                        SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                        _searchResultCustom.Name = item.GetMetaData("Name").ToString();
                        _searchResultCustom.Score = float.NaN;
                        _searchResultCustom.Snippet = "";
                        _searchResultCustom.PhoneNumber = item.GetMetaData("PhoneNumber").ToString();
                        _searchResultCustom.EmailAddress = item.GetMetaData("EmailAddress").ToString();
                        _searchResultCustom.WebsiteUrl = item.GetMetaData("WebsiteUrl").ToString();
     
                        _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), item.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                        _searchResultCustom.DateCreated = item.DateCreated;
                        _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(item)).Owner.ToString();
                        list.Add(_searchResultCustom);
     
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                return list;
            }
     
            /// <summary>
            /// Search content publish and archive
            /// </summary>
            /// <param name="list"></param>
            /// <returns></returns>
            public IList SearchGetData(IList list)
            {
     
                IList contList = new List<IContent>();
                try
                {
                    if (IsAdmin)
                    {
                        foreach (IContent item in list)
                        {
                            if (item.Status != ContentStatus.Archived)
                            {
                                contList.Add(item);
                            }
                        }
                    }
                    else
                    {
                        foreach (IContent item in list)
                        {
                            if (item.Status == ContentStatus.Published)
                            {
                                contList.Add(item);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                return contList;
     
            }
     
            protected override void SetItemHeaderContent(Control itemContainer, IContent contentItem)
            {
                base.SetItemHeaderContent(itemContainer, contentItem);
                if (!this.Page.IsPostBack && this.Page != null)
                {
                    ViewState["SortOrder"] = " ASC";
                }
     
     
     
            }
     
            #region Sorting
     
            void btn_Command(object sender, CommandEventArgs e)
            {
                this.SortData(e.CommandName);
            }
     
            void lnkDateCreated_Command(object sender, CommandEventArgs e)
            {
                this.SortData(e.CommandName);
            }
     
            /// <summary>
            ///
            /// </summary>
            /// <param name="sortExpression"></param>
            void SortData(string sortExpression)
            {
     
                if (ViewState["SortOrder"] == null)
                {
                    ViewState["SortOrder"] = " ASC";
                }
                else if (ViewState["SortOrder"].ToString() == " ASC")
                {
                    ViewState["SortOrder"] = " DESC";
                }
                else
                {
                    ViewState["SortOrder"] = " ASC";
                }
     
                var Managers = new ContentManager("Business");
                List<Telerik.Cms.Engine.IMetaSearchInfo> filter = new List<Telerik.Cms.Engine.IMetaSearchInfo>();
                IList list = new List<IContent>();
                List<SearchResultCustomClass> Customlist = new List<SearchResultCustomClass>();
                if (CategoryCombo.SelectedValue.ToLower() == "all category")
                {
                    int count = 0;
                    IList catList = manager.GetCategories(true, false);
                    foreach (ICategory cat in catList)
                    {
                        filter.Add(new MetaSearchInfo(MetaValueTypes.ShortText, "Category", cat.CategoryName));
                        list = manager.GetContent(filter.ToArray());
     
     
                        foreach (IContent item in list)
                        {
     
                            SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                            _searchResultCustom.Name = item.GetMetaData("Name").ToString();
                            _searchResultCustom.Score = float.NaN;
                            _searchResultCustom.Snippet = "";
     
                            _searchResultCustom.PhoneNumber = item.GetMetaData("PhoneNumber").ToString();
                            _searchResultCustom.EmailAddress = item.GetMetaData("EmailAddress").ToString();
                            _searchResultCustom.WebsiteUrl = item.GetMetaData("WebsiteUrl").ToString();
                            _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), item.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                            _searchResultCustom.DateCreated = item.DateCreated;
                            _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(item)).Owner.ToString();
                            Customlist.Add(_searchResultCustom);
                            count++;
     
                        }
     
                    }
     
                    Message.Text = "Found " + count.ToString() + " content(s) in All category ";
     
                }
                else
                {
     
                    Customlist = GetNonSearchDataSource();// GetSearchData();
                }
                IQueryable<SearchResultCustomClass> source = ((IList)Customlist).Cast<SearchResultCustomClass>().AsQueryable<SearchResultCustomClass>();
                if (list != null)
                {
                    if (sortExpression == "Name")
                    {
                        if (ViewState["SortOrder"].ToString() == " DESC")
                        {
                            source = source.OrderByDescending(c => c.Name);
                        }
                        else
                        {
                            source = source.OrderBy(c => c.Name);
                        }
                    }
     
                    if (sortExpression == "DateCreated")
                    {
                        if (ViewState["SortOrder"].ToString() == " DESC")
                        {
                            source = source.OrderByDescending(c => c.DateCreated);
                        }
                        else
                        {
                            source = source.OrderBy(c => c.DateCreated);
                        }
                    }
                }
     
                CatGrid.DataSource = source;
                CatGrid.DataBind();
     
            }
     
            #endregion
     
            #region Category
     
            /// <summary>
            /// get category list.
            /// </summary>
            /// <param name="text"></param>
            /// <returns> list of ICategory</returns>
            private List<ICategory> GetGategoryData(string text)
            {
                List<ICategory> catgList = new List<ICategory>();
                ContentManager manager = new ContentManager(this.ProviderName);
                try
                {
                    var cont = manager.GetCategories(true, true);//.Cast<ICategory>().Where(c => c.CategoryName.Contains(text));
                    foreach (ICategory val in cont)
                    {
                        catgList.Add(val);
                    }
                }
     
     
                catch (Exception ex)
                {
                    throw ex;
                }
                return catgList;
            }
     
     
            protected void RadComboBox1_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e)
            {
                Search.Text = "";
                List<SearchResultCustomClass> Customlist = new List<SearchResultCustomClass>();
                ContentManager manager = new ContentManager(this.ProviderName);
                List<Telerik.Cms.Engine.IMetaSearchInfo> filter = new List<Telerik.Cms.Engine.IMetaSearchInfo>();
               
                if (CategoryCombo.SelectedValue.ToLower() != "all category")
                {
     
                    filter.Add(new MetaSearchInfo(MetaValueTypes.ShortText, "Category", e.Value));
                    IList list = manager.GetContent(filter.ToArray());
                    int i = 0;
     
                    foreach (IContent item in list)
                    {
     
                        SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                        _searchResultCustom.Name = item.GetMetaData("Name").ToString();
                        _searchResultCustom.Score = float.NaN;
                        _searchResultCustom.Snippet = "";
     
                        _searchResultCustom.PhoneNumber = item.GetMetaData("PhoneNumber").ToString();
                        _searchResultCustom.EmailAddress = item.GetMetaData("EmailAddress").ToString();
                        _searchResultCustom.WebsiteUrl = item.GetMetaData("WebsiteUrl").ToString();
                        _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), item.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                        _searchResultCustom.DateCreated = item.DateCreated;
                        _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(item)).Owner.ToString();
                        Customlist.Add(_searchResultCustom);
                        i++;
     
                    }
                    Message.Text = "Found " + i.ToString() + " content(s) for category " + CategoryCombo.SelectedValue;
     
                }
                else if (CategoryCombo.SelectedValue.ToLower() == "all category")
                {
                    // Get content for all category and add them in a list
     
                    int i = 0;
                    IList catList = manager.GetCategories(true, false);
                    foreach (ICategory cat in catList)
                    {
                        filter.Add(new MetaSearchInfo(MetaValueTypes.ShortText, "Category", cat.CategoryName));
                        IList list = manager.GetContent(filter.ToArray());
     
     
                        foreach (IContent item in list)
                        {
     
                            SearchResultCustomClass _searchResultCustom = new SearchResultCustomClass();
                            _searchResultCustom.Name = item.GetMetaData("Name").ToString();
                            _searchResultCustom.Score = float.NaN;
                            _searchResultCustom.Snippet = "";
     
                            _searchResultCustom.PhoneNumber = item.GetMetaData("PhoneNumber").ToString();
                            _searchResultCustom.EmailAddress = item.GetMetaData("EmailAddress").ToString();
                            _searchResultCustom.WebsiteUrl = item.GetMetaData("WebsiteUrl").ToString();
                            _searchResultCustom.Url = string.Concat(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Path).Replace(".aspx", ""), item.UrlWithExtension, ".aspx"); //base.GetItemUrl(content, content.UrlWithExtension);
                            _searchResultCustom.DateCreated = item.DateCreated;
                            _searchResultCustom.Creator = ((Telerik.Cms.Engine.Data.CmsContentBase)(item)).Owner.ToString();
                            Customlist.Add(_searchResultCustom);
                            i++;
     
                        }
     
                    }
     
                    Message.Text = "Found " + i.ToString() + " content(s) in All category ";
     
                }
                CatGrid.DataSource = Customlist;
                CatGrid.DataBind();
     
            }
             
            private const int ItemsPerRequest = 15;
            protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
            {
                List<ICategory> data = GetGategoryData(e.Text);
     
                int itemOffset = e.NumberOfItems;
                int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Count);
                e.EndOfItems = endOffset == data.Count;
                int count = 0;
     
     
                for (int i = itemOffset; i < endOffset; i++)
                {
     
                    CategoryCombo.Items.Add(new RadComboBoxItem(data[i].CategoryName + "(" + data[i].ContentCount.ToString() + ")", data[i].CategoryName));
                    count += data[i].ContentCount;
                }
     
                // Add All Category item in items.
                if (CategoryCombo.Items.Count > 0)
                {
     
                    CategoryCombo.Items.Insert(0, (new RadComboBoxItem("All category" + "(" + count.ToString() + ")", "All category")));
                }
            }
            #endregion
     
            public class SearchResultCustomClass
            {
                public float Score
                {
                    get;
                    set;
                }
     
                public string Snippet
                {
                    get;
                    set;
                }
     
                public string Url
                {
                    get;
                    set;
                }
                public string Name
                {
                    get;
                    set;
                }
                public string Creator
                {
                    get;
                    set;
                }
     
                public DateTime DateCreated
                {
                    get;
                    set;
                }
     
                public string EmailAddress
                {
                    get;
                    set;
                }
                public string PhoneNumber
                {
                    get;
                    set;
                }
                public string WebsiteUrl
                {
                    get;
                    set;
                }
     
            }
     
        }
     
    }

    Master Page

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="GoldriverHome.master.cs" Inherits="App_Master_GoldriverHome" %>
     
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
     
    <%@ Register TagPrefix="SC" Namespace="Telerik.Search.WebControls" Assembly="Telerik.Search" %>
    <%@ Register TagPrefix="UC" TagName="PageTitle" Src="~/UserControls/PageTitle.ascx" %>
    <%@ Register TagPrefix="UC" TagName="SiteMenu" Src="~/Sitefinity/UserControls/Navigation35/SiteMenu.ascx" %>
    <%@ Register TagPrefix="UC" TagName="Tabs" Src="~/Sitefinity/UserControls/Navigation35/SiteTabstrip.ascx" %>
    <%@ Register TagPrefix="UC" TagName="LoginStatus" Src="~/UserControls/CustomLoginStatus.ascx" %>
    <%@ Register Src="../Sitefinity/UserControls/Login/LoginControl.ascx" TagName="LoginControl"
        TagPrefix="uc1" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head id="Head1" runat="server">
        <title></title>
         
         
       <%-- <!--[if lte IE 6]>
            <script src="/js/pngfix.js" type="text/javascript"></script>
            <script src="/js/ie6fixes.js" type="text/javascript"></script>
        <![endif]-->--%>
    </head>
    <body>
        <form id="form1" runat="server">
        <%--<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>--%>
        <%-- <telerik:RadScriptManager ID="d" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxManager id="radajaxmanager"  runat="server"></telerik:RadAjaxManager>--%>
         
         
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div id="header">
            <div id="slogan_ad">
                <font color="white">ad here...</font>
            </div>
            <div id="logoouter">
                <div id="logo">
                </div>
                <div id="logindiv" style="height: 75px;">
                    <asp:ContentPlaceHolder ID="cphLogin" runat="server">
                        <uc1:LoginControl ID="LoginControl1" runat="server" />
                    </asp:ContentPlaceHolder>
                </div>
            </div>
            <div id="menus">
                <table style="width:100%;" border="0" cellpadding="0" cellspacing="0">
                    <tr class="divBlack">
                        <td style="vertical-align: middle;text-align:center; width: 170px;">
                            <span id="homedate" runat="server" class="smallText">
                                <%--<%= System.DateTime.Now.ToString("D") %>--%></span>
                        </td>
                        <td>
                            <asp:ContentPlaceHolder ID="cphSiteMenu" runat="server">
                                <UC:SiteMenu ID="SiteMenu1" runat="server" />
                            </asp:ContentPlaceHolder>
                        </td>
                    </tr>
                </table>
                <div id="menuLine">
                     </div>
            </div>
            
           <div id="register">
                    <UC:LoginStatus ID="loginStatus" runat="server" />
                </div>
            <div class="clear">
            </div>
        </div>
        <!-- end headerInner -->
        <!-- end header -->
        <!-- end featured -->
        <div id="featuredBottom">
        </div>
        <div id="content-full" class="wrapper">
         
            <div id="main-full">
                <asp:ContentPlaceHolder ID="mainContentPlaceHolder" runat="server" />
            </div><!-- end main -->
             
             
             
            <div class="clear"></div>
             
        </div><!-- end content -->
         
        <div id="footerTop">
        </div>
        <div id="footer">
            <div id="footerInner" class="wrapper">
                <div class="minipost">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server" />
                </div>
                <div class="minipost">
                    <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server" />
    <