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

Unable get the File names in RadUpload in codebehind (C#)

4 Answers 296 Views
Upload (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Mohan
Top achievements
Rank 1
Mohan asked on 24 Jul 2012, 07:54 PM

Hi ,
         I am unable to get the file names in the RadUpload  control .

IN ASPX

   <telerik:RadUpload runat="server" id="RadUpload1" />

IN ASPX.CS

    protected void SaveChanges_Click(object sender, EventArgs e)
        {
            int count = RadUpload1.UploadedFiles.Count;                    
        }

Error :  Unable to get the Uploaded files count in Server side.

Note :  I have tried the following work arounds in below, still i didn't get the output, This control is placed under Nested Master page -> inside RadMultiPage -> RadPanelItem -> RadUpload1

http://www.telerik.com/help/aspnet-ajax/upload-uploading-ajax.html

Please check the attached sample file

Regards
Mohan


4 Answers, 1 is accepted

Sort by
0
Mohan
Top achievements
Rank 1
answered on 25 Jul 2012, 07:25 AM
Hi
    I have added my aspx code . Please give us some solutions ASAP


<%@ Page Title="" Language="C#" MasterPageFile="~/Framework/Masters/Settings.master"
    AutoEventWireup="true" CodeBehind="CompanyProfileCatalog11.aspx.cs" Inherits="Web.Views.Settings.Company.CompanyProfileCatalog11"
    ClientIDMode="AutoID" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="SettingHeadContent" runat="server">

<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
       
</telerik:RadCodeBlock>


    <script type="text/javascript">

     

        function OnClientClick(strPanelToExpand) {
            var PanelBar1 = $find("<%= pnlbargeneralnotes.ClientID %>");
            var PanelBar2 = $find("<%= pnlbarcompanyInformation.ClientID %>");
          
           
            PanelBar1.get_items().getItem(0).set_expanded(false);
            PanelBar2.get_items().getItem(0).set_expanded(false);
            

            if (strPanelToExpand == "APIS_Interface") {
                PanelBar3.get_items().getItem(0).set_expanded(true);
            }
            //            else if (strPanelToExpand == "BlackBerry") {s
            //                PanelBar3.get_items().getItem(0).set_expanded(true);
            //            }
            else if (strPanelToExpand == "General_Notes") {
                PanelBar1.get_items().getItem(0).set_expanded(true);
            }
            return false;
        }

        function ValidateEmptyTextbox(ctrlID, e) {

            if (ctrlID.value == "") {

                ctrlID.value = "0.00";
            }
        }

        function ValidateEmptyTextbox1(ctrlID, e) {

            if (ctrlID.value == "") {

                ctrlID.value = "W";
            }
        }

        function openWin(radWin) {
           
           
            var oWnd = radopen(url, radWin);
        }  
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="SettingBodyContent" runat="server">
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxSettingCreating="RadAjaxManager1_AjaxSettingCreating">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnSaveChanges">
                <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadUpload1"/>
                    <telerik:AjaxUpdatedControl ControlID="divCompanyProfileCatalogForm" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnCancel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divCompanyProfileCatalogForm" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btndgCancel">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divCompanyProfileCatalogForm" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btndgSave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divCompanyProfileCatalogForm" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnDelete">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divCompanyProfileCatalogForm" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="dgCompanyProfileCatalog">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="dgCompanyProfileCatalog" LoadingPanelID="RadAjaxLoadingPanel1" />
                    <telerik:AjaxUpdatedControl ControlID="divCompanyProfileCatalogForm" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="clrFilters">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="clrFilters" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Sunset" />
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">


            function ConfirmClose(WinName) {
              
            }
            function OnClientCloseAirportMasterPopup(oWnd, args) {
              
            }


            function OnClientCloseFederalTaxPopup(oWnd, args) {
               
            }

            function OnClientCloseCrewDutyRulesPopup(oWnd, args) {
               
               
            }

            function OnClientCloseCategoryPopup(oWnd, args) {
              
            }

            function OnClientCloseCrewChecklistGroupPopup(oWnd, args) {
               
            }

            function OnClientClosePurposePopup(oWnd, args) {
                
            }

            function openWin3() {
              
            }

            function openWin4() {
              
            }



            function openWin5() {
               
            }

            function openWin6() {
             
            }

            function OnClientCloseStateTaxPopup(oWnd, args) {
              
            }
            function OnClientCloseSalesTaxPopup(oWnd, args) {
               
            }

            function GetDimensions(sender, args) {
             
            }
            function GetRadWindow() {
              
            }

        </script>
    </telerik:RadCodeBlock>
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">
        <Windows>
            <telerik:RadWindow ID="radAirportCatalog" runat="server" OnClientResize="GetDimensions"
                OnClientClose="OnClientCloseAirportMasterPopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Airports/AirportMasterPopup.aspx">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow ID="radFederalTaxAccountPopup" runat="server" OnClientResize="GetDimensions"
                OnClientClose="OnClientCloseFederalTaxPopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Company/AccountMasterPopup.aspx">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow ID="radStateTaxAccountPopup" runat="server" OnClientResize="GetDimensions"
                OnClientClose="OnClientCloseStateTaxPopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Company/AccountMasterPopup.aspx">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow ID="radSalesTaxAccountPopup" runat="server" OnClientResize="GetDimensions"
                OnClientClose="OnClientCloseSalesTaxPopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Company/AccountMasterPopup.aspx">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow ID="radCrewCurrencyPopup" runat="server" OnClientResize="GetDimensions"
                CssClass="RadCrewCurrencyPopup" AutoSize="true" KeepInScreenBounds="true" Modal="true"
                Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Company/CrewCurrencyPopup.aspx">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow ID="radTripPrivacySettingPopup" runat="server" OnClientResize="GetDimensions"
                AutoSize="true" KeepInScreenBounds="true" Modal="true" Title="Private Trip Settings"
                Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Company/TripPrivacySettings.aspx">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow ID="radCrewDutyRulesPopup" runat="server" OnClientResize="GetDimensions"
                OnClientClose="OnClientCloseCrewDutyRulesPopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/People/CrewDutyRulesPopup.aspx">
            </telerik:RadWindow>
        </Windows>

        <Windows>
            <telerik:RadWindow ID="RadCategoryPopup" runat="server" OnClientResize="GetDimensions"
                OnClientClose="OnClientCloseCategoryPopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Fleet/CategoryPopup.aspx">
            </telerik:RadWindow>
        </Windows>
        <Windows>
            <telerik:RadWindow ID="RadCrewChecklistGroupPopup" runat="server" OnClientResize="GetDimensions" Title="Checklist Group Catalog"
                OnClientClose="OnClientCloseCrewChecklistGroupPopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/People/CrewChecklistGroupPopup.aspx">
            </telerik:RadWindow>
        </Windows>
        <Windows>
            <telerik:RadWindow ID="RadCustomLog" runat="server" OnClientResize="GetDimensions"
                AutoSize="false" KeepInScreenBounds="true" Height="400px" Width="700px" Modal="true"
                Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Company/CustomLog.aspx">
            </telerik:RadWindow>
        </Windows>
        <Windows>
            <telerik:RadWindow ID="RadCustomPilotLog" runat="server" OnClientResize="GetDimensions"
                AutoSize="false" KeepInScreenBounds="true" Height="400px" Width="700px" Modal="true"
                Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/Company/CustomPilotLog.aspx">
            </telerik:RadWindow>
        </Windows>
        <Windows>
            <telerik:RadWindow ID="RadTenthMin" runat="server" OnClientResize="GetDimensions"
                AutoSize="true" KeepInScreenBounds="true" Modal="true" Behaviors="close" VisibleStatusbar="false"
                NavigateUrl="~/Views/Settings/Company/TenthMinConversion.aspx">
            </telerik:RadWindow>
        </Windows>
        <Windows>
            <telerik:RadWindow ID="RadPurposePopup" runat="server" OnClientResize="GetDimensions"
                OnClientClose="OnClientClosePurposePopup" AutoSize="true" KeepInScreenBounds="true"
                Modal="true" Behaviors="close" VisibleStatusbar="false" NavigateUrl="~/Views/Settings/People/PurposePopup.aspx">
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    <table style="width: 100%;" cellpadding="0" cellspacing="0">
        <tr>
            <td align="left">
                <div class="tab-nav-top">
                    <span class="head-title">Company Profile</span> <span class="tab-nav-icons">
                        <!--<a href="#"
                        class="search-icon"></a><a href="#" class="print-icon"></a>-->
                        <a href="#" class="help-icon"></a></span>
                </div>
            </td>
        </tr>
    </table>
    <table style="width: 100%;" cellpadding="0" cellspacing="0">
        <tr>
            <td align="left">
                <div class="nav-space">
                </div>
            </td>
        </tr>
    </table>
    <telerik:RadGrid ID="dgCompanyProfileCatalog" runat="server" AllowSorting="true"
        OnItemCreated="dgCompanyProfileCatalog_ItemCreated" Visible="true" OnNeedDataSource="dgCompanyProfileCatalog_BindData"
        OnItemCommand="dgCompanyProfileCatalog_ItemCommand" OnUpdateCommand="dgCompanyProfileCatalog_UpdateCommand"
        OnInsertCommand="dgCompanyProfileCatalog_InsertCommand" OnDeleteCommand="dgCompanyProfileCatalog_DeleteCommand"
        AutoGenerateColumns="false" Height="330px" PageSize="10" AllowPaging="true" OnSelectedIndexChanged="dgCompanyProfileCatalog_SelectedIndexChanged"
        AllowFilteringByColumn="true" PagerStyle-AlwaysVisible="true">
        <MasterTableView DataKeyNames="CustomerID,HomeBaseID,HomeBaseCD,BaseDescription,CrewDutyRuleCD,CatagoryCD,CrewChecklistGroupCD,IsInActive,LastUpdUID,LastUpdTS"
            CommandItemDisplay="Bottom">
            <Columns>
                <telerik:GridBoundColumn DataField="HomeBaseCD" HeaderText="Main Base" CurrentFilterFunction="StartsWith"
                    ShowFilterIcon="false">
                </telerik:GridBoundColumn>
                <telerik:GridBoundColumn DataField="BaseDescription" HeaderText="Base Description"
                    CurrentFilterFunction="StartsWith" ShowFilterIcon="false">
                </telerik:GridBoundColumn>
                <telerik:GridCheckBoxColumn DataField="IsInActive" HeaderText="Inactive" CurrentFilterFunction="StartsWith"
                    ShowFilterIcon="false">
                </telerik:GridCheckBoxColumn>
            </Columns>
            <CommandItemTemplate>
                <div style="padding: 5px 5px; float: left; clear: both;">
                    <asp:LinkButton ID="lbtnInitInsert" runat="server" ToolTip="Add" CommandName="InitInsert"><img style="border:0px;vertical-align:middle;" alt="Add" src="<%=ResolveClientUrl("~/App_Themes/Default/images/AddRecord.png") %>" /></asp:LinkButton>
                    <asp:LinkButton ID="lbtnInitEdit" runat="server" OnClientClick="javascript:return ProcessUpdate();"
                        ToolTip="Edit" CommandName="Edit"><img style="border:0px;vertical-align:middle;" alt="Edit" src="<%=ResolveClientUrl("~/App_Themes/Default/images/EditRecord.png") %>" /></asp:LinkButton>
                    <asp:LinkButton ID="lbtnDelete" OnClientClick="javascript:return ProcessDelete();"
                        runat="server" CommandName="DeleteSelected" ToolTip="Delete"><img style="border:0px;vertical-align:middle;" alt="Delete" src="<%=ResolveClientUrl("~/App_Themes/Default/images/delete.png") %>" /></asp:LinkButton>
                </div>
                <div>
                    <asp:Label ID="lbLastUpdatedUser" runat="server" CssClass="last-updated-text"></asp:Label>
                </div>
            </CommandItemTemplate>
        </MasterTableView>
        <ClientSettings EnablePostBackOnRowClick="true">
            <Scrolling AllowScroll="true" UseStaticHeaders="true" />
            <Selecting AllowRowSelect="true" />
        </ClientSettings>
        <GroupingSettings CaseSensitive="false" />
    </telerik:RadGrid>

     
    <div id="divCompanyProfileCatalogForm" runat="server" class="ExternalForm">
 
        <asp:Panel ID="pnlCompanyProfileCatalogForm" runat="server" Visible="true">
          
            <br />
            <br />
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td>
                        <table width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <telerik:RadTabStrip ID="TabCompanyProfileCatalog" runat="server" Skin="Black" ReorderTabsOnSelect="true"
                                        MultiPageID="RadMultiPage1" SelectedIndex="0" Align="Justify" Width="600px" Style="float: inherit">
                                        <Tabs>
                                            <telerik:RadTab Text="Company Information">
                                            </telerik:RadTab>
                                            <telerik:RadTab Text="XYC1">
                                            </telerik:RadTab>
                                            <telerik:RadTab Text="XYC1">
                                            </telerik:RadTab>
                                            <telerik:RadTab Text="XYC1">
                                            </telerik:RadTab>
                                            <telerik:RadTab Text="XYC1">
                                            </telerik:RadTab>
                                        </Tabs>
                                    </telerik:RadTabStrip>
                                    <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
                                        <telerik:RadPageView ID="RadPageView1" runat="server">
                                            <telerik:RadPanelBar ID="pnlbarcompanyInformation" Width="100%" ExpandAnimation-Type="None"
                                                CollapseAnimation-Type="none" runat="server">
                                                <Items>
                                                    <telerik:RadPanelItem runat="server" Expanded="true" Text=" " CssClass="PanelHeaderStyle">
                                                        <Items>
                                                            <telerik:RadPanelItem>
                                                                <ContentTemplate>
                                                                    <table width="100%">
                                                                        <tr>
                                                                            <td>
                                                                                <table width="100%" class="box_tab">
                                                                                    <tr>
                                                                                        <td>
                                                                                            <asp:CheckBox ID="chkNoteDisplay" runat="server" />
                                                                                            Note Display
                                                                                        </td>
                                                                                        <td>
                                                                                            <asp:CheckBox ID="chkAutoDispatchNumber" runat="server" />
                                                                                            Auto Dispatch Number
                                                                                        </td>
                                                                                        <td>
                                                                                            <asp:CheckBox ID="chkInactive" runat="server" />
                                                                                            Inactive
                                                                                        </td>
                                                                                        <td>
                                                                                            Default Date Format
                                                                                            <asp:DropDownList ID="ddlDefaultDateFormat" runat="server">
                                                                                                <asp:ListItem Value="MM/dd/yyyy">American</asp:ListItem>
                                                                                                <asp:ListItem Value="yyyy.MM.dd">ANSI</asp:ListItem>
                                                                                                <asp:ListItem Value="dd/MM/yyyy">British</asp:ListItem>
                                                                                                <asp:ListItem Value="dd/MM/yyyy">French</asp:ListItem>
                                                                                                <asp:ListItem Value="dd.MM.yyyy">German</asp:ListItem>
                                                                                                <asp:ListItem Value="dd-MM-yyyy">Italian</asp:ListItem>
                                                                                                <asp:ListItem Value="yyyy/MM/dd">Japan</asp:ListItem>
                                                                                                <asp:ListItem Value="yyyy/MM/dd">Taiwan</asp:ListItem>
                                                                                                <asp:ListItem Value="MM-dd-yyyy">USA</asp:ListItem>
                                                                                                <asp:ListItem Value="MM/dd/yyyy">MDY</asp:ListItem>
                                                                                                <asp:ListItem Value="dd/MM/yyyy">DMY</asp:ListItem>
                                                                                                <asp:ListItem Value="yyyy/dd/MM">YDM</asp:ListItem>
                                                                                            </asp:DropDownList>
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td>
                                                                                            <asp:CheckBox ID="chkConflictChecking" runat="server" />
                                                                                            Conflict Checking
                                                                                        </td>
                                                                                        <td>
                                                                                            <asp:CheckBox ID="chkTextAutotab" runat="server" />
                                                                                            Text Auto-tab
                                                                                        </td>
                                                                                        <td>
                                                                                            <asp:CheckBox ID="chkCanpasspermit" Checked="false" runat="server" AutoPostBack="true"
                                                                                                OnCheckedChanged="chkCanpasspermit_CheckedChanged" />
                                                                                            Canpass permit
                                                                                        </td>
                                                                                    </tr>
                                                                                </table>
                                                                            </td>
                                                                        </tr>
                                                                        <table width="100%">
                                                                            <tr>
                                                                                <td>
                                                                                   
                                                                                    <tr>
                                                                                        <td>
                                                                                            TSA
                                                                                        </td>
                                                                                    </tr>
                                                                                    <tr>
                                                                                        <td>
                                                                                            TSA - Cleared File Name
                                                                                        </td>
                                                                                        <td colspan="4">
                                                                                            <asp:FileUpload ID="TSAClearedFile" runat="server" CssClass="text330" onchange="javascript:return FuelVendorFile_onchange();" /><asp:RegularExpressionValidator
                                                                                                ID="rexp" runat="server" ControlToValidate="TSAClearedFile" ValidationGroup="Save"
                                                                                                ForeColor="Red" ErrorMessage="Upload Only .xlsx file." ValidationExpression="(.*\.([Xx][Ll][Ss][Xx])$)"></asp:RegularExpressionValidator>
                                                                                        </td>
                                                                                    </tr>
                                                                                   
                                                                                    <tr>
                                                                                        <td>
                                                                                            TSA - No Fly
                                                                                        </td>
                                                                                        <td colspan="4">
                                                                                          <telerik:RadUpload runat="server" id="RadUpload1" />
                                                                                            <asp:FileUpload ID="TSANoFlyFile" runat="server" CssClass="text330" />

                                                                                            <%--<asp:RegularExpressionValidator
                                                                                                ID="RegularExpressionValidator1" runat="server" ControlToValidate="TSANoFlyFile"
                                                                                                ValidationGroup="Save" ForeColor="Red" ErrorMessage="Upload Only .xlsx file."
                                                                                                ValidationExpression="(.*\.([Xx][Ll][Ss][Xx])$)"></asp:RegularExpressionValidator>--%>
                                                                                        </td>
                                                                                    </tr>
                                                                                  
                                                                                    <tr>
                                                                                        <td colspan="5">
                                                                                        </td>
                                                                                    </tr>
                                                                             
                                                                                </td>
                                                                            </tr>
                                                                        </table>
                                                                    </table>
                                                                </ContentTemplate>
                                                            </telerik:RadPanelItem>
                                                        </Items>
                                                    </telerik:RadPanelItem>
                                                </Items>
                                            </telerik:RadPanelBar>
                                        </telerik:RadPageView>                                      
                                    </telerik:RadMultiPage>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table cellspacing="0" cellpadding="0" style="width: 100%;">
                            <tr>
                                <td align="left">
                                    <div class="nav-space">
                                    </div>
                                </td>
                            </tr>
                        </table>
                        <table width="100%" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <telerik:RadPanelBar ID="pnlbargeneralnotes" Width="100%" ExpandAnimation-Type="None"
                                        CollapseAnimation-Type="None" runat="server">
                                        <Items>
                                            <telerik:RadPanelItem runat="server" Expanded="true" Text="General Notes" CssClass="PanelHeaderStyle">
                                                <Items>
                                                    <telerik:RadPanelItem>
                                                        <ContentTemplate>
                                                            <table width="100%" cellpadding="0" cellspacing="0">
                                                                <tr>
                                                                    <td>
                                                                        <asp:TextBox ID="tbgeneralnotes" runat="server" TextMode="MultiLine" CssClass="textarea-autox80"></asp:TextBox>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </ContentTemplate>
                                                    </telerik:RadPanelItem>
                                                </Items>
                                            </telerik:RadPanelItem>
                                        </Items>
                                    </telerik:RadPanelBar>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <table cellspacing="0" cellpadding="0" class="tblButtonArea">
                <tr>
                    <td>
                        <asp:Button ID="btnSaveChanges" Text="Save" CssClass="button" runat="server" OnClick="SaveChanges_Click"
                            ValidationGroup="Save" />
                    </td>
                    <td>
                        <asp:Button ID="btnCancel" Text="Cancel" CssClass="button" CausesValidation="false"
                            runat="server" />
                      
                    </td>
                </tr>
            </table>
        </asp:Panel>
        
    </div>
   
</asp:Content>




0
Dimitar Terziev
Telerik team
answered on 27 Jul 2012, 08:00 AM
Hi,

By default files could not be uploaded with Ajax when using the RadUpload control. Here is a help article on the matter.

Kind regards,
Dimitar Terziev
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
Mohan
Top achievements
Rank 1
answered on 27 Jul 2012, 09:46 AM
Hi Dimitar ,
         Thanks for your reply . But I have already tried this link and also i have mentioned that same link  what you have send  .
So can you give me some good solutions :)  for Radupload or .net file upload  to solve this issues

for your easy understanding  I have made a sample  for you.

 

In Master page  Please add the below line
====================
   <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="41600"  />
=====================
Default.aspx.cs

        protected void Button1_Click(object sender, EventArgs e)
        {  string strUpload=Upload.FileName ;// File Name is Empty here .Please help me out 
            if (RadUpload.UploadedFiles.Count > 0)            {
                string str = RadUpload.UploadedFiles[0].FileName;
            }
        }
Default.aspx
==========================
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="WebApplication2._Default" %>
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">


 <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" />
      <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="Button1">
                <UpdatedControls>                
                    <telerik:AjaxUpdatedControl ControlID="divCompanyProfileCatalogForm" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            </AjaxSettings>
      </telerik:RadAjaxManager>
          <div id="divCompanyProfileCatalogForm" runat="server" class="ExternalForm">
              <telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0">
                                        <telerik:RadPageView ID="RadPageView1" runat="server">
                                            <telerik:RadPanelBar ID="pnlbarcompanyInformation" Width="100%" ExpandAnimation-Type="None"
                                                CollapseAnimation-Type="none" runat="server">
                                                <Items>
                                                    <telerik:RadPanelItem runat="server" Expanded="true" Text=" " CssClass="PanelHeaderStyle">
                                                        <Items>
                                                            <telerik:RadPanelItem>
                                                                <ContentTemplate>
                                                                <telerik:RadUpload runat="server" ID="RadUpload"></telerik:RadUpload>
                                                                <asp:FileUpload ID="Upload" runat="server" />
                                                                <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="Button" />

                                                                  </ContentTemplate>
                                                            </telerik:RadPanelItem>
                                                        </Items>
                                                    </telerik:RadPanelItem>
                                                </Items>
                                            </telerik:RadPanelBar>
                                        </telerik:RadPageView>                                      
                                    </telerik:RadMultiPage>

 </div>
</asp:Content>
   





Regards,
Mohan
0
Dimitar Terziev
Telerik team
answered on 30 Jul 2012, 04:55 PM
Hi,

In such scenario where Ajax is being used it's convenient to use the RadAsyncUpload control instead. Here is a link to its documentation and here is a link to the online demos.

Greetings,
Dimitar Terziev
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.
Tags
Upload (Obsolete)
Asked by
Mohan
Top achievements
Rank 1
Answers by
Mohan
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or