473,830 Members | 2,124 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Changing icon in GridView, and back

Hi all!
I have a gridview with a templatefield and an imagebutton

<asp:TemplateFi eld>
<ItemTemplate >
<asp:ImageButto n ID="Riepilogo" runat="server"
CommandArgument ="<%#((GridView Row)Container). RowIndex%>"
ImageUrl="~/img/search.png"
CommandName="ri epilogo" ToolTip="Riepil ogo attività impianto"
onClick="prova" OnClientClick=" src='img/blue_loader.gif '; Visible='True'"/>
</ItemTemplate>
</asp:TemplateFie ld>

When i click that imagebutton, the onclientclick event changes the standard
image to a "waiting" animated gif.

The code for CommandName is something like that:
....
Response.ClearH eaders();
Response.Clear( );
Response.AddHea der("Content-Disposition", "attachment ;
filename=output .pdf");
Response.Conten tType = myStuff.getAppS etting("Content TypePDF");
Response.Flush( );
Response.Binary Write(pdf);
Response.End();
....

This generates a PDF files that pops up for the download.

Now i have to change the image back to normal (not waiting). How do i
accomplish this?

Thank you in advance.
Nov 19 '07 #1
1 1352
becuase the request is a file download, there is no browser notification
javascript can get of when the domaload is done. you can use ajax to poll the
server to for when the download is done. be sure the poll is non-session
page.

-- bruce (sqlwork.com)
"gianfranco dalfiume" wrote:
Hi all!
I have a gridview with a templatefield and an imagebutton

<asp:TemplateFi eld>
<ItemTemplate >
<asp:ImageButto n ID="Riepilogo" runat="server"
CommandArgument ="<%#((GridView Row)Container). RowIndex%>"
ImageUrl="~/img/search.png"
CommandName="ri epilogo" ToolTip="Riepil ogo attivitÃ* impianto"
onClick="prova" OnClientClick=" src='img/blue_loader.gif '; Visible='True'"/>
</ItemTemplate>
</asp:TemplateFie ld>

When i click that imagebutton, the onclientclick event changes the standard
image to a "waiting" animated gif.

The code for CommandName is something like that:
....
Response.ClearH eaders();
Response.Clear( );
Response.AddHea der("Content-Disposition", "attachment ;
filename=output .pdf");
Response.Conten tType = myStuff.getAppS etting("Content TypePDF");
Response.Flush( );
Response.Binary Write(pdf);
Response.End();
....

This generates a PDF files that pops up for the download.

Now i have to change the image back to normal (not waiting). How do i
accomplish this?

Thank you in advance.
Nov 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2881
by: Charlotte | last post by:
Hi there, does anyone know the HTML code or Java script for changing the website icon when other people add the link to their favourites menu?? Thanks~ Charlotte
14
2149
by: Kishan Hathiwala | last post by:
Hi i have kept a statusbar in the form with panels = true. and total there 3 panels. whenever i click on the 3rd panel a menu appears showing online and offline and either is enable at a time. once i clic on online its icon changes to connecticon (assume its there) and whenever i click on offline, its icon changes to disconnection (assume this is also there). now the problem is i have kept one icon for connection (ie when its online -...
2
9656
by: Amjad | last post by:
Hi, I'm using the NotifyIcon to process some text files in the background periodically. I want to display one icon in the task bar when the program is in stand by mode, and I want to display another icon when it is in processing mode. How can I do that? I have some pseudo code below: Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Try If processing Then
1
6519
by: Henry Habermacher [MVP Access] | last post by:
Environment: VS2005, ASP.Net 2.0, SQLServer 2000, VB.Net, IIS6 I use a GridView Control which is based on a SQLDataSource. The datasource is based on a Select statement and is filtered by the FilterExpression. The GridView also has a pager element (below, displaying first, previous, next, last icons), paging is enabled, page contains 10 rows. The user now skips some pages by clicking a view times on the next icon. Now he changes the...
0
2441
by: landesjoe | last post by:
Hi, here's my problem in short: Text boxes in gridview don't seem to hold their value if the column's .Visible property is changed back and forth. I've got a form with a gridview populated from a data view (which in turn is loaded from a manually setup DataTable for testing purposes). One of the columns in the grid is a checkbox that's tied to an event handler that'll change the .Visible property of a column with a text box. That text...
1
1011
by: silpa | last post by:
Hi, I have a gridview. It has two columns.first column contains a thread. Second column contains an image which is of type buttonfield to close this thread which is shown below. The image is a key icon. <asp:ButtonField ButtonType="Image" ImageUrl="~/Images/key.gif" CommandName="Close"> <ItemStyle HorizontalAlign="Center" Width="20px" /> </asp:ButtonField>
5
1709
by: Mark B | last post by:
I'd like to have a field in a gridview (or standalone on a webpage) that not only drops down each salespersons name but also precedes their name with a blue, red, green or orange dot icon depicting what group they belong to. Can drop-downs have such graphics as opposed to just text? TIA
15
15835
by: stefbek97 | last post by:
Hello All, I am having Trouble with a Gridview control In my asp.net/C# application. It contains Some boundFields and one checkbox field. My gridview allows Editing. It succesfully enters edit mode and when i hit update the Datasource updates but the control will not return to readonly mode. I have gone far enough to figure out the problem is caused by the Checkbox field.The checkbox works and passes the correct true/false value to the...
7
7662
by: student2 | last post by:
Hi! I want to create a command from my Desktop that would automatically open my Database from that button or Icon. I've tried going to the Properties of the AutoExecute Form (SwitchBoard) to create a shortcut, however, I'm unable to change the icon from the Macro Sign. I've also tried my desktop by right-clicking and choosing Shortcut and Changing the Icon and assigning the location. However this Option still shows the MS Access box...
0
9641
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10523
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10199
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5616
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5778
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4409
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.