The element 'buildProviders' cannot be defined below the application level

by ebarcza 9/26/2012 6:38:00 AM
I was scratching my head on this one.... This error means that the element can only be present on the web.config placed on the top level folder of an application dir. In my situation I had a website(as opposed to a project) underneath another website. I had a sub directory withint my site and this sub directory isn't configured in IIS as a web application. I placed it in it's own root level directory and problem was solved



Telerik Rad Loading Panel Not Working or Showing with User Controls

by pencilvac 4/19/2012 6:18:00 AM

I came across an issue with an aspx page containing a user control which had several parts of each ajaxified. We needed to ajaxifiy a number of tasks for our users which also needed telerik content loading panels so the user knew something was happening. The RadAjaxManager is located inside the aspx page as so:

         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <ClientEvents OnRequestStart="onRequestStart" />
                    <telerik:AjaxSetting AjaxControlID="rgDeals">
                            <telerik:AjaxUpdatedControl ControlID="rgDeals" LoadingPanelID="lpComponents" />
                            <telerik:AjaxUpdatedControl ControlID="lblRecords" />
                     <telerik:AjaxSetting AjaxControlID="btnRetrieve">
                            <telerik:AjaxUpdatedControl ControlID="rgDeals" LoadingPanelID="lpComponents" />
                            <telerik:AjaxUpdatedControl ControlID="lblRecords" />
                            <telerik:AjaxUpdatedControl ControlID="ucPipelineClose" LoadingPanelID="lpComponents" />
                     <telerik:AjaxSetting AjaxControlID="ucPipelineClose">
                            <telerik:AjaxUpdatedControl ControlID="rgPipelineClose"
LoadingPanelID="lpPipelineClose" />


The bolded AjaxSetting is to Ajaxify the user control within the aspx page. The control ID is obviously ucPipelineClose and the updated control is a radgrid within the control. After many efforts I could not get the loading panel to appear over the radgrid as was expected when changes were made or ajaxified to the user control. Trying to change the control ID and updated controls made no difference as well.

THE SOLUTION: It seemed that the ajax manager was unable to locate exactly which controls were being updated and where exactly to put the loading panel correctly. The solution I came up with was to use a RadAjaxManagerProxy inside of the control to specify the controls to ajaxify, update, and show loading panel for. I set the control ID to the button click that is to be ajaxified, with the radgrid as the updated control and it worked beautifully.

   <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
            <telerik:AjaxSetting AjaxControlID="btnSavePipelineClose">
                    <telerik:AjaxUpdatedControl ControlID="rgPipelineClose" LoadingPanelID="lpPipelineClose" />
                    <telerik:AjaxUpdatedControl ControlID="rgDeals" />


.NET | ASP.NET AJAX | ASP.NET Enterprise Library | Telerik

Disable form validators with Javascript API

by pencilvac 2/17/2012 12:00:00 PM

You may come across the necessity in a project to disable or enable server side form validators because of some form of client side action with javascript. In my scenario I had to either display or hide a state dropdownlist ( a telerik control radcombobox) and show a region/province text box in a customer input form depending on whether the user was from the USA or another country. When the user was outside of the U.S. we obviously need to remove the state recquired field validator.

In order to do so I took advantage of the very robust Telerik radcombobox javascript api which included the onClientLoad and OnClientSelectedIndexChanged Client side functions which I attached to my countries radcombobox.

<telerik:RadComboBox  Width="142" ID="ddlCountries" OnClientLoad="checkCountry" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged"  runat="server" MarkFirstMatch="True" />

onClientLoad runs any javascript you put inside of it immediately after the drop down is done loading. OnClientSelectedIndexChanged runs, well, right after the user picks a new value in the drop down.

OnClientLoad function :

    function checkCountry(sender) {

        var value = document.getElementById('<%=ddlCountries.ClientID  %>').value;

        if (value !== "United States") {

            var stateValidator = document.getElementById('<%= valState.ClientID  %>');
            ValidatorEnable(stateValidator, false);

        else {

            var stateValidator = document.getElementById('<%= vaState.ClientID  %>');
            ValidatorEnable(stateValidator, true);


Basically the function onload checks to see if the value of the drop down selected is the United States or not. If it is the U.S. then the 

ValidatorEnable function take the parameter of the server ID of the validator you either want to enable or disable as well as whether you want

to enable or disable it. In order to retrieve the Client side ID of the validator I threw the javascript functions within a Telerik Code block.


Like magic you can disable and/or enable your server side validators from client side javascript using the Telerik javascript API.


ASP.NET AJAX | JavaScript | Telerik

Export ListView to Excel

by jrose 8/20/2010 10:02:00 AM

All results that I came across when performing a search for export listview to excel were related to instances of Windows.Forms.ListView and not System.Web.UI.WebControls.ListView.


Attached are the two functions necessary to export instances of System.Web.UI.WebControls.ListView to Excel.

public override void VerifyRenderingInServerForm(Control control) { }

protected void btnExport_Click(object sender, EventArgs e)
    Response.Buffer = true;
    Response.ContentType = "application/";
    Response.Charset = "";
    this.EnableViewState = false;
    StringWriter stringWriter = new StringWriter();
    HtmlTextWriter htmlTextWriter = new HtmlTextWriter(stringWriter);

Tags: , , ,

.NET | ASP.NET AJAX | Excel Programming

ListView vs Gridview

by rbellantoni 4/7/2010 8:43:00 AM

Some people may be wondering what is the difference is between a ListView and a GridView. In my opinion, the ListView is a much better tool in regards to displaying and manipulating data. With the ListView you use templates to design the different views. The first template is the with this template you can dictate where you want your datarows to show up and how you want your data laid out here is an example:

<asp:ListView ID="lvProducerPools" runat="server" onitemdatabound="lvProducerPools_ItemDataBound" onitemcommand="lvProducerPools_ItemCommand" DataKeyNames="PoolID,Locked_flag">
<div style="float:left;width: 1000px;overflow-x:auto;overflow-y:hidden;padding-top:5px; padding-bottom:15px;">
<table cellpadding="0" cellspacing="0" style="table-layout:fixed;height:18px;font-size:10pt;">
<tr style="height:18px;" id="itemPlaceholder" runat="server" />
<td id="poolLInk" style="width:175px;height:18px;background-color:#cdcdcd;border-right:1px gray groove; padding: 2px;" runat="server">
<asp:LinkButton ID="lnkLoadPool" runat="server"> <%# Eval("PoolName")%></asp:LinkButton>
<asp:Image ToolTip="Deals in this allocation have been locked" ID="imgLock" runat="server" Visible='<%# Eval("Locked_flag")%>' ImageUrl="~/images/lock.gif" />
<asp:Label BorderColor="#8c9bad" BackColor="White" Font-Bold="true" BorderStyle="Double" BorderWidth="2px" ForeColor="Black" Font-Size="10px" ID="lblImbalance" runat="server" Text='<%# Eval("TLBalance")%>' >
<td id="poolLInk" style="background-color:#cdcdcd;border-right:1px gray groove; padding: 4px;" runat="server">

The ID for "itemPlaceHolder" is not by accident, this is the identifier row where your itemtemplate rows will be bound. The advantage to this is that you have FULL control of how the html is rendered from your datasource. Whereas in a gridview your stuck with the table column design of the layout. Additionally you can use the datapager control inside of the template to enable paging, which does not work with the Gridview Control.




Unable to load client print control issue

by rbellantoni 2/24/2010 4:43:00 AM

If you have ever run into this problem you understand how frustrating it can be, one of the fixes is to go and download this SP and install it to fix it.


Another one we tried was to go to SQL Server pull down the files and install them on the local machines (located in: Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\ReportServer\bin) and delete the old RLL and dll files


Then we also tried to uninstall a few windows updates that installed killbits ActiveX Killbits (KB956391)

If anyone else has tried anything that worked let us know!



Powered by BlogEngine.NET
Theme by Mads Kristensen

About the author

Name of author Author name
Something about me and what I do.

E-mail me Send mail


<<  October 2022  >>

View posts in large calendar

Recent comments



The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2022

Sign in