Click here to Skip to main content
15,901,426 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Javascript : Help please Pin
talasila8027-Sep-07 9:05
talasila8027-Sep-07 9:05 
AnswerRe: Javascript : Help please Pin
Guffa27-Sep-07 9:56
Guffa27-Sep-07 9:56 
AnswerRe: Javascript : Help please Pin
Christian Graus27-Sep-07 12:16
protectorChristian Graus27-Sep-07 12:16 
AnswerRe: Javascript : Help please Pin
s1ihome27-Sep-07 17:41
s1ihome27-Sep-07 17:41 
QuestionError on Vista Machine Pin
Brady Kelly27-Sep-07 7:23
Brady Kelly27-Sep-07 7:23 
AnswerRe: Error on Vista Machine Pin
eggsovereasy27-Sep-07 8:36
eggsovereasy27-Sep-07 8:36 
GeneralRe: Error on Vista Machine Pin
Brady Kelly27-Sep-07 9:05
Brady Kelly27-Sep-07 9:05 
QuestionRedirecting a page after Response.End() Pin
talasila8027-Sep-07 5:40
talasila8027-Sep-07 5:40 
Hi all

Here is the situation, I have a button named "Export To Excel", Now when someone clicks the button the button gets disabled as I added the following code to Page_Load

Me.ExcelExportButton.Attributes.Add("onclick", GetPostBackEventReference(Me.ExcelExportButton) & ";this.value='Please wait...';this.disabled = true;")

Now I execute some code for generating the excel file, at the end of the event I use the following statements to open a "Save As" dialog box so the use can save it,

Response.ContentType = "application/excel"

Response.AppendHeader("Content-Disposition", "attachment; filename=Report " + System.DateTime.Now.ToString.Replace("/", "-").Replace(":", ".") + ".xls")
Response.TransmitFile(fileName)

Response.End()

It all works fine but the disabled button does not enable back whatever I do, the only way I think I can enable the button is to redirect the page to itself,

But if I use Response.Redirect next to Response.End the page redirects but the "Save As" dialog does not appear and so the user can not save the file,

any help would be really appreciated,

Thanks in advance

Sri

AnswerRe: Redirecting a page after Response.End() Pin
Guffa27-Sep-07 6:16
Guffa27-Sep-07 6:16 
GeneralRe: Redirecting a page after Response.End() Pin
talasila8027-Sep-07 6:23
talasila8027-Sep-07 6:23 
QuestionCustom Data Access Objects Pin
Banjo Ayorinde27-Sep-07 5:28
Banjo Ayorinde27-Sep-07 5:28 
QuestionValidating Web Server Controls (e.g DetailsView) Pin
Banjo Ayorinde27-Sep-07 5:24
Banjo Ayorinde27-Sep-07 5:24 
QuestionProblem with Login (Asp.net Membership Providert) Pin
Banjo Ayorinde27-Sep-07 5:18
Banjo Ayorinde27-Sep-07 5:18 
Questiondropdownlist wont display category id Pin
learningman27-Sep-07 4:27
learningman27-Sep-07 4:27 
AnswerRe: dropdownlist wont display category id Pin
John-ph27-Sep-07 4:48
John-ph27-Sep-07 4:48 
GeneralRe: dropdownlist wont display category id Pin
learningman27-Sep-07 8:05
learningman27-Sep-07 8:05 
JokeRe: dropdownlist wont display category id Pin
John-ph27-Sep-07 9:50
John-ph27-Sep-07 9:50 
GeneralRe: dropdownlist wont display category id Pin
learningman27-Sep-07 10:50
learningman27-Sep-07 10:50 
Questionhow can I close the window I'm in Pin
Big Ralph27-Sep-07 3:58
Big Ralph27-Sep-07 3:58 
AnswerRe: how can I close the window I'm in Pin
Sandeep Akhare27-Sep-07 4:03
Sandeep Akhare27-Sep-07 4:03 
AnswerRe: how can I close the window I'm in Pin
Guffa27-Sep-07 8:05
Guffa27-Sep-07 8:05 
AnswerRe: how can I close the window I'm in Pin
Malcolm Smart27-Sep-07 4:14
Malcolm Smart27-Sep-07 4:14 
AnswerRe: how can I close the window I'm in Pin
Amol M Vaidya27-Sep-07 21:04
professionalAmol M Vaidya27-Sep-07 21:04 
AnswerRe: how can I close the window I'm in Pin
John-ph27-Sep-07 5:01
John-ph27-Sep-07 5:01 
QuestionWant to Fire a Query on DataTable Pin
varshavmane27-Sep-07 3:06
varshavmane27-Sep-07 3:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.