Questions tagged [response.write]
141 questions
4
votes
4 answers
how to write a file object on server response and without saving file on server?
I am using Spring with DWR . I want to return a file object as response , however I save the file (to be sent) at server temporary location and then send its location as href for anchor tag on client side , however I wonder if there could be a way…

Sankalp
- 2,030
- 7
- 30
- 41
4
votes
2 answers
what is response.write in asp.net mvc?
This will be quite simple but
What is the best way of using classical webforms "response.write" in asp net MVC. Especially mvc5.
Let's say: I just would like to write a simple string to screen from controller.
Does response.write exist in…

oneNiceFriend
- 6,691
- 7
- 29
- 39
4
votes
2 answers
Using updateprogress while generating a file with Response.write in ASP.NET
I am creating an Excel file with Response.write in my C# file and it takes 1-2 mins to create the file. I would like to make use of UpdateProgress to indicate that the file generation is in progress. But when I use UpdateProgress, the file is not…
RajMohan
4
votes
3 answers
Response.WriteFile writing the content twice
Here is my code..
string attachment = "attachment; filename=Call-Details-Report-" + startDate.SelectedDate.Value.ToString("MM-dd-yyyy") + ".csv";
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
…

iJade
- 23,144
- 56
- 154
- 243
3
votes
1 answer
Response.Write - how do I get rid of the script now?
I used Response.Write to write dynamic javascript into a page to test some values in code using an alert box (couldn't step through on a test machine using a build). I've reverted the code, Rebuilt, deleted all the temp data from IE and the alert…

Yatrix
- 13,361
- 16
- 48
- 78
3
votes
1 answer
MVC how to serve images to response stream
In my controller I retrieve a list of products along with an image name, then scale the image down to the size needed by the view. The images are now in memory, ready to be written to the response stream. I know the client will send a response for…

StuTheDog
- 451
- 1
- 11
- 19
3
votes
2 answers
Response closes after export document
I have been trying to export a Word document into Response using ASP.Net. So I achieved this goal with this code.
Response.Clear();
Response.ClearHeaders();
Response.ClearContent();
Response.ContentEncoding = Encoding.UTF8;
Response.Charset =…

Mlh
- 147
- 3
- 16
3
votes
3 answers
HTML Code to C# StringBuilder Tool?
I used to use a tool that you type in an HTML Code lik this one:
:

Danpe
- 18,668
- 21
- 96
- 131
3
votes
5 answers
Why Response.Write behavior varies in the given scenario?
When i POST the page using the following code, the Response.write("Hey") doesn't write the content ("Hey") to the parent page
3
votes
2 answers
Appending to BODY element
Just before (or during) rendering page I would like to append a piece of code (java script). However when I try to add new LiteralControl via Page.Controls property I get an error:
The Controls collection cannot be modified because the control…

dragonfly
- 17,407
- 30
- 110
- 219
3
votes
1 answer
Is it possible to change the classic ASP response once you've written to it?
If I have a classic ASP response in the format:
someJsFunctionName({"0":{"field1":0,"field2":"","field3":0,"field4":2,"field5":1,"field6":1}});
that is built with
response.write "someFunctionName("
someMethod(param1, param2).Flush
response.write…

StuperUser
- 10,555
- 13
- 78
- 137
3
votes
1 answer
Response.Write in particular section of Markup
I have a web application in ASP.NET, C# and MS SQL Server. I am using an external CSS Metro UI CSS that provides me styled components like Tiles (similar to Win8), notices, buttons and so on. I want to show content fetched from the Database or…

Samarth Agarwal
- 2,044
- 8
- 39
- 79
3
votes
1 answer
What is the practical difference between Response.Write and <%= %>?
I've run into an issue where a third-party component appears to be interfering with Response.Write and causing any content within Response.Write("") to render before any of the other html. For example:
<% Response.Write("HELLO…

Chris Van Opstal
- 36,423
- 9
- 73
- 90
3
votes
6 answers
How to execute multiple ClientScript.RegisterStartupScript in ASP.NET c#?
I'm developing a gridview in which you can download multiple files with one button.
Here's my gridview:

Victor
- 1,108
- 9
- 29
- 53
3
votes
1 answer
TextBoxWatermarkExtender losing text after Response.Write
I am exporting an asp.net gridview to an excel sheet by Response.Write(*stringBuilder*), but when the button is clicked TextBoxesare losing TextBoxWatermarkExtender Text. Any idea? Thanks.

B10
- 173
- 1
- 11