This is a migrated thread and some comments may be shown as answers.

RadProgressArea showing only after first time

7 Answers 190 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 23 Aug 2012, 08:57 PM
I am building a wizard in the style of this example:  http://demos.telerik.com/aspnet-ajax/tabstrip/examples/applicationscenarios/wizard/defaultcs.aspx 

On the first tab a file is browsed for and selected.
On the second tab a file's data is mapped to relevant fields for my application.
On the third tab, I have a RadProgressArea and a button to run the import.

The first time the import is run, the Progress Area will not show, however the import is run successfully.  If I click the run important again, the Progress Area is shown.  I've noted that during the initial run, a script error from within telerik is raised noting that $get is not defined.  Later runs after the first never post this error.  I'm uncertain why the $get function would not be defined at first.

Perhaps this is an AJAX related issue?

I greatly appreciate feedback and assistance.

Thank you.

EDIT:

I should note use of the following on the import button:
RadScriptManager.GetCurrent(this).RegisterPostBackControl(buttonImportFile);

Without this, the progress area is never shown and the $get fails continually.

7 Answers, 1 is accepted

Sort by
0
Peter Filipov
Telerik team
answered on 28 Aug 2012, 07:51 AM
Hi Robert,

I tried the provided sample code from your support ticket and I was not able to run it. Please send me working sample project, that reproduces the issue, for a local investigation. In order to avoid duplication of the thread please continue our conversation in the support ticket.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Lucania
Top achievements
Rank 1
answered on 30 Aug 2012, 03:19 AM
Hi Peter,

I have just experienced the same symptoms, and have created a fairly simple example that exhibits the problem, see below. Once you've entered some text in the textbox, the first file you upload will not display a progress bar, but will successfully upload the file chosen. Subsequent uploads will display the progress bar, until you click the "Test" button, after which the first upload will not display it again, but subsequent ones will. When the progress bar isn't shown, I get the same javascript error as Robert. The chunk of code highlighted is:
RadUploadSafariProgressArea.prototype = {get_id:function (){return this._id;
},show:function (){if(!this._element){this._element=$get(this._clientId);
Uncaught ReferenceError: $get is not defined
}

Also, if you remove the RadInputManager, the problem goes away. Could it be related to this?

Regards

ROSCO

<telerik:RadAjaxManagerProxy ID="proxy" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="pnlTest">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="pnlTest" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManagerProxy>
<asp:Panel ID="pnlTest" runat="server">
    <telerik:RadInputManager ID="input" runat="server">
        <telerik:TextBoxSetting ErrorMessage="Field required" EmptyMessage="Please enter ..." InvalidCssClass="invalidField" EmptyMessageCssClass="emptyField">
            <Validation IsRequired="true" />
            <TargetControls>
                <telerik:TargetInput ControlID="txtTest" />
            </TargetControls>
        </telerik:TextBoxSetting>
    </telerik:RadInputManager>
 
    <asp:TextBox ID="txtTest" runat="server" />
    <asp:LinkButton ID="btnTest" runat="server" Text="Test" CausesValidation="true" ValidationGroup="grp1" />
 
    <telerik:RadProgressManager ID="rpmTest" runat="server" />
    <telerik:RadProgressArea ID="rpaTest" runat="server" ProgressIndicators="FilesCountBar, FilesCountPercent, CurrentFileName">
        <Localization CurrentFileName="Step:" UploadedFiles="Progress:" />
    </telerik:RadProgressArea>
</asp:Panel>
<telerik:RadUpload ID="ruTest" runat="server" InitialFileInputsCount="1" ControlObjectsVisibility="None" />
<asp:LinkButton ID="btnUpload" runat="server" Text="Upload" CssClass="StandardLink smalltext printerhide" onclick="btnUpload_Click" CausesValidation="false" />

public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
    protected void btnUpload_Click(object sender, EventArgs e)
    {
        Page.Validate();
        if (!Page.IsValid)
            return;
 
        RadProgressContext progress = RadProgressContext.Current;
        progress.SecondaryTotal = 2;
        progress.SecondaryValue = 0;
        progress.SecondaryPercent = 0;
        string sTempFileDFata = null;
 
        if (ruTest.UploadedFiles.Count == 1)
        {
            sTempFileDFata = Path.GetTempFileName();
 
            // Upload the files
            progress.CurrentOperationText = "Uploading";
            ruTest.UploadedFiles[0].SaveAs(sTempFileDFata);
            System.Threading.Thread.Sleep(1000);
            progress.SecondaryValue = 1;
            progress.SecondaryPercent = 50;
 
            System.Threading.Thread.Sleep(1000);
            progress.CurrentOperationText = "Complete";
            progress.SecondaryValue = 2;
            progress.SecondaryPercent = 100;
            System.Threading.Thread.Sleep(250);
        }
        if (sTempFileDFata != null)
            File.Delete(sTempFileDFata);
    }
}
0
Peter Filipov
Telerik team
answered on 03 Sep 2012, 10:29 AM
Hi Ross,

I am afraid that even with the provided code I was not able to reproduce the issue. I am sending you the setup page. Could you test it at your side? Try to change it until the problem appears and send it back for a local investigation. Here is a video how I tested the attached page.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Lucania
Top achievements
Rank 1
answered on 03 Sep 2012, 11:27 PM
Hi Peter, thanks for the sample, but the page you sent exhibits the same problem here, so there must be something different in our project setup. Below is my web.config, there may be something different in there?

Thanks

<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
  <configSections>
    <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>
  </configSections>
  <appSettings/>
  <connectionStrings/>
  <location path="Telerik.RadUploadProgressHandler.ashx">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization >
    </system.web>
  </location>
  <system.web>
    <!--
      Set compilation debug="true" to insert debugging
      symbols into the compiled page. Because this
      affects performance, set this value to true only
      during development.
    -->
    <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.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
        <add assembly="Telerik.Web.UI, Version=2011.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
        <add assembly="Telerik.Web.Design, Version=2011.1.519.35, Culture=neutral, PublicKeyToken=121FAE78165BA3D4"/>
      </assemblies>
    </compilation>
    <membership defaultProvider="MyProvider" userIsOnlineTimeWindow="15">
      <providers>
        <clear/>
      </providers>
    </membership>
    <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"/>
      </controls>
    </pages>
    <!--
      The <authentication> section enables configuration
      of the security authentication mode used by
      ASP.NET to identify an incoming user.
    -->
    <authentication mode="Forms"/>
    <!--
      The <customErrors> section enables configuration
      of what to do if/when an unhandled error occurs
      during the execution of a request. Specifically,
      it enables developers to configure html error pages
      to be displayed in place of a error stack trace.
 
    <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
      <error statusCode="403" redirect="NoAccess.htm" />
      <error statusCode="404" redirect="FileNotFound.htm" />
    </customErrors>
    -->
    <httpHandlers>
      <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 path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2011.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" verb="*" validate="false"/>
      <add path="Telerik.RadUploadProgressHandler.ashx" verb="*" type="Telerik.Web.UI.RadUploadProgressHandler" validate="false" />
    </httpHandlers>
    <httpModules>
      <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
    </httpModules>
  </system.web>
  <system.codedom>
    <compilers>
      <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="WarnAsError" value="false"/>
      </compiler>
      <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
        <providerOption name="CompilerVersion" value="v3.5"/>
        <providerOption name="OptionInfer" value="true"/>
        <providerOption name="WarnAsError" value="false"/>
      </compiler>
    </compilers>
  </system.codedom>
  <!--
        The system.webServer section is required for running ASP.NET AJAX under Internet
        Information Services 7.0.  It is not necessary for previous version of IIS.
    -->
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
      <remove name="ScriptModule"/>
      <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    </modules>
    <handlers>
      <remove name="WebServiceHandlerFactory-Integrated"/>
      <remove name="ScriptHandlerFactory"/>
      <remove name="ScriptHandlerFactoryAppServices"/>
      <remove name="ScriptResource"/>
      <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"/>
      <remove name="Telerik.Web.UI.WebResource"/>
      <add name="Telerik.Web.UI.WebResource" path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI, Version=2011.1.519.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"/>
    </handlers>
  </system.webServer>
  <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>
</configuration>
0
Peter Filipov
Telerik team
answered on 06 Sep 2012, 12:55 PM
Hello Robert,

I tested the sample project with the provided web config and everything is working fine. Please setup a project with our dlls and send it for a local test. I am sending you the web config and the page that I tested at my side.

Regards,
Peter Filipov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Rob
Top achievements
Rank 1
answered on 14 Sep 2012, 04:25 PM
I believe you meant to address Ross.  I'm going to take some time to investigate again as I have the moment.

I'll notify of my results.

Thanks.
0
Rob
Top achievements
Rank 1
answered on 01 Oct 2012, 01:25 PM
While working with another teammate, we discovered a solution.  My teammate noted from another forum thread that a full postback was necessary for the progress area to show.  We had a partial postback occurring on our tab navigation.  By removing that postback (AutoPostBack="False" for RadTabStrip) and registering postbacks on the button controls we use to move between tabs, we solved the issue.

In Page_Load we registered the following for each button:

RadScriptManager.GetCurrent(this).RegisterPostBackControl(buttonName);

I hope this helps others.
Tags
Upload (Obsolete)
Asked by
Rob
Top achievements
Rank 1
Answers by
Peter Filipov
Telerik team
Lucania
Top achievements
Rank 1
Rob
Top achievements
Rank 1
Share this question
or