473,382 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Changing icon in GridView, and back

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

<asp:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="Riepilogo" runat="server"
CommandArgument="<%#((GridViewRow)Container).RowIn dex%>"
ImageUrl="~/img/search.png"
CommandName="riepilogo" ToolTip="Riepilogo attività impianto"
onClick="prova" OnClientClick="src='img/blue_loader.gif'; Visible='True'"/>
</ItemTemplate>
</asp:TemplateField>

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.ClearHeaders();
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=output.pdf");
Response.ContentType = myStuff.getAppSetting("ContentTypePDF");
Response.Flush();
Response.BinaryWrite(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 1329
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:TemplateField>
<ItemTemplate>
<asp:ImageButton ID="Riepilogo" runat="server"
CommandArgument="<%#((GridViewRow)Container).RowIn dex%>"
ImageUrl="~/img/search.png"
CommandName="riepilogo" ToolTip="Riepilogo attivitÃ* impianto"
onClick="prova" OnClientClick="src='img/blue_loader.gif'; Visible='True'"/>
</ItemTemplate>
</asp:TemplateField>

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.ClearHeaders();
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment;
filename=output.pdf");
Response.ContentType = myStuff.getAppSetting("ContentTypePDF");
Response.Flush();
Response.BinaryWrite(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
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
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....
2
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...
1
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...
0
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...
1
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...
5
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...
15
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...
7
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.