Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > AJAX Asyncfileupload - how to refresh updatepanel after UploadedComplete

Reply
Thread Tools

AJAX Asyncfileupload - how to refresh updatepanel after UploadedComplete

 
 
Mel
Guest
Posts: n/a
 
      01-18-2012
I am using the latest AJAX control toolkit (4.1.51116.0). I have a
modalpopupextender, AsyncFileUpload and a gridview inside an update
panel in my web user control (.ascx) page . The modal popup extender
appears and after the upload I want to update the gridview to display
some of the data I read in from the file. I have search Goole forever
and tried many solutions and I can't figure it out. Please help.
 
Reply With Quote
 
 
 
 
Mel
Guest
Posts: n/a
 
      01-18-2012
On Jan 18, 9:24*am, Mel <mlights...@gmail.com> wrote:
> I am using the latest AJAX control toolkit (4.1.51116.0). *I have a
> modalpopupextender, AsyncFileUpload and a gridview inside an update
> panel in my web user control (.ascx) page . *The modal popup extender
> appears and after the upload I want to update the gridview to display
> some of the data I read in from the file. *I have search Goole forever
> and tried many solutions and I can't figure it out. *Please help.


Nevermind. I finally got it. Here is my ascx file if this helps
anyone out there.

<%@ Control Language="VB" AutoEventWireup="false"
CodeFile="ImportSubstrates.ascx.vb"
Inherits="ImportSubstrates" %>
<%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:ModalPopupExtender ID="mpeImportSubstrates" runat="server"
BehaviorID="behidImp"
TargetControlID="Button2" PopupControlID="pnlImportSubstrates"
CancelControlID="btnImpDone"
BackgroundCssClass="modalBackground" />
<aspanel ID="pnlImportSubstrates" Style="display: none"
runat="server" CssClass="modalPopup"
Width="1000px">
<center>
<b>Import Data</b></center>
<br />
Select the Excel file: <br />
<div id="divImpSubmit" class="divSubstrateSubmit">
<asp:AsyncFileUpload runat="server" ID="AsyncFileUpload1"
Width="800px" UploadingBackColor="#CCFFFF" ThrobberID="myThrobber" />

&nbsp;<asp:Label runat="server" ID="myThrobber"
Style="display: none;"><img align="middle" alt="" src="images/
uploading.gif" /></asp:Label>
<asp:UpdatePanel ID="upImportedSubstrates" runat="server">
<ContentTemplate>
<asp:Button ID="cmdImport" runat="server" Text="Import Data" /
><asp:Label ID="lblStatus"

runat="server" Text=""></asp:Label> <br /><br />
<asp:GridView ID="gvSubstrates" runat="server" CellPadding="2"
AutoGenerateColumns="False"
EmptyDataText="No substrates have been imported."
ForeColor="#333333">
<Columns>
<asp:TemplateField HeaderText="Item"
SortExpression="Item" ItemStyle-Wrap="False">
<EditItemTemplate>
<asp:TextBox ID="txtItem" runat="server"
Text='<%# Bind("Item") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblItem" runat="server" Text='<
%# Bind("Item") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Desc"
SortExpression="Desc" ItemStyle-Wrap="False">
<EditItemTemplate>
<asp:TextBox ID="txtDesc" runat="server"
Text='<%# Bind("Desc") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblDesc" runat="server" Text='<
%# Bind("Desc") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="UM" SortExpression="UM"
ItemStyle-Wrap="False">
<EditItemTemplate>
<asp:TextBox ID="txtUM" runat="server" Text='<
%# Bind("UM") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblUM" runat="server" Text='<%#
Bind("UM") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="Qty"
SortExpression="Qty" ItemStyle-Wrap="False">
<EditItemTemplate>
<asp:TextBox ID="txtQty" runat="server" Text='<
%# Bind("Qty") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="lblQty" runat="server" Text='<
%# Bind("Qty") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" ForeColor="White" Font-
Bold="True" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333"
HorizontalAlign="Left" />
<PagerStyle BackColor="#284775" ForeColor="White"
HorizontalAlign="Center" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True"
ForeColor="#333333" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True"
ForeColor="White" />
<AlternatingRowStyle BackColor="White"
ForeColor="#284775" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
</div>
<div id="divDone" class="divSubstrateDone">
<asp:Button ID="btnImpDone" runat="server" Text="Close"
Width="50px" ValidationGroup="import" />
</div>
</aspanel>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
asyncfileupload with updatepanel in modalpopupextender snaj84@gmail.com ASP .Net 0 07-12-2012 06:45 PM
ajax asyncfileupload can't get filename on production server Mel ASP .Net 0 02-28-2012 08:15 PM
AJAX UpdatePanel does not refresh after calling Update()-Method Michael Schöller ASP .Net 1 11-23-2009 03:33 PM
refresh an updatePanel in an other updatePanel fran_j_diaz@yahoo.fr ASP .Net 3 08-08-2007 06:30 AM



Advertisments