RadAsyncUpload files not uploading for first time

2 posts, 0 answers
  1. Santhosh
    Santhosh avatar
    1 posts
    Member since:
    Jan 2013

    Posted 03 Jan 2013 Link to this post


    I Am using RadAsyncUpload , when i first time open the page and upload at that time it will hung and it will not upload.If i refresh the page and upload then it will upload Properly.Another issue is i am using inside RadWindow RadAsyncUpload,but when i scroll down radwindow, RadAsyncUpload control is also moving with that.please please help,its Very very urgent.

    Here is My Code:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Testupload.aspx.cs" Inherits="Testupload"
        MaintainScrollPositionOnPostback="true" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>AFE Addattachment</title>
        <%--<style type="text/css">
            .ruUploadProgress, li .ruCancel, li .ruRemove
        <form id="form1" runat="server">
        <%--<asp:ScriptManager ID="ScriptManager1"  runat="server">
        <telerik:RadScriptManager ID="RadScriptManager2" runat="server">
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
                <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Outlook" />
        <%--<telerik:RadFormDecorator ID="QsfFromDecorator" runat="server" DecoratedControls="All"
            EnableRoundedCorners="false" />--%>
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

            <script type="text/javascript">
            function ClientFileSelected(source, eventargs) {
                var button = $find("<%= SubmitButton.ClientID %>");
                var button1= $find("<%= ExitButton.ClientID %>");
    //             var xPos, yPos;
    //      var prm = Sys.WebForms.PageRequestManager.getInstance();

    //      function BeginRequestHandler(sender, args) {
    //        if ($get('<%=RadUpload1.ClientID%>') != null) {
    //          // Get X and Y positions of scrollbar before the partial postback
    //          xPos = $get('<%=RadUpload1.ClientID%>').scrollLeft;
    //          yPos = $get('<%=RadUpload1.ClientID%>').scrollTop;
    //        }
    //     }

    //     function EndRequestHandler(sender, args) {
    //         if ($get('<%=RadUpload1.ClientID%>') != null) {
    //           // Set X and Y positions back to the scrollbar
    //           // after partial postback
    //           $get('<%=RadUpload1.ClientID%>').scrollLeft = xPos;
    //           $get('<%=RadUpload1.ClientID%>').scrollTop = yPos;
    //         }
    //     }

    //     prm.add_beginRequest(BeginRequestHandler);
    //     prm.add_endRequest(EndRequestHandler);

    //var xPos, yPos;
    //    var prm = Sys.WebForms.PageRequestManager.getInstance();
    //    prm.add_beginRequest(BeginRequestHandler);
    //    prm.add_endRequest(EndRequestHandler);
    //    function BeginRequestHandler(sender, args) {
    //        xPos = $get('RadUpload1').scrollLeft;
    //        yPos = $get('RadUpload1').scrollTop;
    //    }
    //    function EndRequestHandler(sender, args) {
    //        $get('RadUpload1').scrollLeft = xPos;
    //        $get('RadUpload1').scrollTop = yPos;
    //    }

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <asp:Panel ID="Panel1" runat="server" Height="300">
                    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
                            <telerik:RadWindow ID="RadWindow1" runat="server" Width="750" Height="300" RestrictionZoneID="RestrictionZoneID"
                                Behaviors="None" VisibleOnPageLoad="true" EnableShadow="true" Title="AFE AddAttachment">
                                            <td style="width: 60%" align="left">
                                                <asp:Label ID="AfeNum" runat="server" Text="AFENumber:"></asp:Label>
                                                <asp:TextBox ID="AFENUMBER" runat="server" Enabled="false" OnTextChanged="TextBox1_TextChanged"
                                            <td align="right">
                                                <asp:Label ID="Label2" runat="server" Text="WellName:"></asp:Label>
                                                <asp:TextBox ID="WName" runat="server" Width="150px" Enabled="false" OnTextChanged="TextBox2_TextChanged"
                                            <td style="width: 60%" align="left">
                                                Source File To Upload:
                                            <td align="right" style="width: 19.5%">
                                                Document Type:
                                            <td align="left">
                                                    <telerik:RadProgressManager runat="server" ID="RadProgressManager1" />
                                                    <telerik:RadAsyncUpload runat="server" ID="RadUpload1" MultipleFileSelection="Automatic"
                                                        Localization-Select="Choose File" InputSize="55" OnClientFileSelected="ClientFileSelected" />
                                                    <telerik:RadProgressArea runat="server" ID="RadProgressArea1" />
                                            <td align="char" style="width: 73%">
                                                <asp:DropDownList ID="DropDownList1" runat="server" Width="130px">
                                                    <asp:ListItem Selected="True">General</asp:ListItem>
                                            <td align="right">
                                                <telerik:RadButton runat="server" ID="SubmitButton" Text="Upload files" Enabled="false"
                                                    OnClick="SubmitButton_Click" />
                                                <telerik:RadButton runat="server" ID="ExitButton" Text="Exit" Enabled="true" OnClick="ExitButton_Click"
                                                    Width="80" />
                                                <asp:Label ID="Label4" runat="server" Text="Upload Comments:"></asp:Label>
                                            <td align="right">
                                                <asp:TextBox ID="TextBox4" runat="server" Height="35px" Width="580px" OnTextChanged="TextBox4_TextChanged"></asp:TextBox>

    Thank You
  2. Plamen
    Plamen avatar
    2958 posts

    Posted 08 Jan 2013 Link to this post

    Hi Santhosh,

    I have tested the code provided at  my side and it worked properly at my side. Here I am attaching my test web page and you the video of my test. Please review them and let me know what else should I do in order to reproduce the unusual behavior.

    All the best,
    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.
Back to Top