Click here to Skip to main content
15,919,028 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Questionxmldatasource + rss + retrieve image Pin
Thommie.h23-Jul-10 8:06
Thommie.h23-Jul-10 8:06 
AnswerRe: xmldatasource + rss + retrieve image Pin
Peace ON23-Jul-10 19:22
Peace ON23-Jul-10 19:22 
GeneralRe: xmldatasource + rss + retrieve image Pin
Thommie.h24-Jul-10 10:05
Thommie.h24-Jul-10 10:05 
QuestionRichtextbox Pin
4anusha423-Jul-10 2:31
4anusha423-Jul-10 2:31 
AnswerRe: Richtextbox Pin
Yusuf23-Jul-10 3:55
Yusuf23-Jul-10 3:55 
AnswerRe: Richtextbox [modified] Pin
raju melveetilpurayil23-Jul-10 3:59
professionalraju melveetilpurayil23-Jul-10 3:59 
GeneralRe: Richtextbox Pin
Sandeep Mewara23-Jul-10 21:37
mveSandeep Mewara23-Jul-10 21:37 
GeneralRe: Richtextbox Pin
raju melveetilpurayil23-Jul-10 21:44
professionalraju melveetilpurayil23-Jul-10 21:44 
GeneralRe: Richtextbox Pin
Sandeep Mewara23-Jul-10 21:47
mveSandeep Mewara23-Jul-10 21:47 
GeneralRe: Richtextbox Pin
raju melveetilpurayil23-Jul-10 21:54
professionalraju melveetilpurayil23-Jul-10 21:54 
AnswerRe: Richtextbox Pin
R. Giskard Reventlov23-Jul-10 4:27
R. Giskard Reventlov23-Jul-10 4:27 
AnswerRe: Richtextbox Pin
Peace ON23-Jul-10 19:36
Peace ON23-Jul-10 19:36 
QuestionHow to use RenderControl() Method with Ajax controls Pin
NTheOne23-Jul-10 0:04
NTheOne23-Jul-10 0:04 
AnswerRe: How to use RenderControl() Method with Ajax controls Pin
Sathesh Sakthivel23-Jul-10 0:09
Sathesh Sakthivel23-Jul-10 0:09 
QuestionI want to open any audio file in my page Pin
jintalPatel22-Jul-10 22:57
jintalPatel22-Jul-10 22:57 
AnswerRe: I want to open any audio file in my page Pin
Peace ON23-Jul-10 4:24
Peace ON23-Jul-10 4:24 
QuestionPrint web page using ASP.NET Pin
NTheOne22-Jul-10 22:20
NTheOne22-Jul-10 22:20 
AnswerRe: Print web page using ASP.NET Pin
Peace ON22-Jul-10 22:32
Peace ON22-Jul-10 22:32 
GeneralRe: Print web page using ASP.NET Pin
NTheOne22-Jul-10 22:48
NTheOne22-Jul-10 22:48 
GeneralRe: Print web page using ASP.NET Pin
Peace ON23-Jul-10 4:29
Peace ON23-Jul-10 4:29 
QuestionViewstate not updated after TransmitFile Pin
KittyKit22-Jul-10 10:53
KittyKit22-Jul-10 10:53 
Hello there

I have been spending almost half-a-day to get this problem solved, but could not even find a single article that would help me. I wonder whether nobody else has faced this problem.

Okay, my webpage involves creating excel files. My download button has code like this

HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = "application/vnd.ms-excel";
HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment; filename=clientcopy.xlsx");
HttpContext.Current.Response.TransmitFile(Server.MapPath("App_data/" + Viewstate["FileName"]));
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.Close();
HttpContext.Current.Response.End();

Alright. this works fine. The problem is, After downloading I want to make Viewstate["FileName"] to be null. But whatever I do, during the next post back after the filetransmit, the Viewstate["FileName"] still retains the old value and refuses to get updated to null. I tried writing the Viewstate["FileName"] = null; at every possible place in the above code - at the begining, in the middle and at the end after response.end(). BUT no way Cry | :((
Can someone help on how to modify the viewstate after a file transmit???

Note:
=====
My webpage has an update panel. Button "GO" displays a report in the update panel based on some selections outside the updatepanel. Button "ADD" keeps on adding the displayed reports to an excelfile until Button "download" is clicked and excelfile is downloaded. "GO" and "ADD" triggers partial postback and "download" triggers fullpostback.

thanks
Kit
AnswerRe: Viewstate not updated after TransmitFile Pin
Yusuf22-Jul-10 13:52
Yusuf22-Jul-10 13:52 
AnswerRe: Viewstate not updated after TransmitFile Pin
Prosanta Kundu online22-Jul-10 19:54
Prosanta Kundu online22-Jul-10 19:54 
AnswerRe: Viewstate not updated after TransmitFile Pin
T M Gray23-Jul-10 8:44
T M Gray23-Jul-10 8:44 
AnswerRe: Viewstate not updated after TransmitFile Pin
KittyKit24-Jul-10 2:32
KittyKit24-Jul-10 2:32 

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.