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
Gopi
  • 5,656
  • 22
  • 80
  • 146
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…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/asp.net" class="post-tag grid--cell" title="show questions tagged 'asp.net'" rel="tag">asp.net</a> <a href="../../questions/tagged/page-lifecycle" class="post-tag grid--cell" title="show questions tagged 'page-lifecycle'" rel="tag">page-lifecycle</a> <a href="../../questions/tagged/response.write" class="post-tag grid--cell" title="show questions tagged 'response.write'" rel="tag">response.write</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Aug 27 '09 at 16:17">asked Aug 27 '09 at 16:17</time> <a href="../../users/7264/chris-van-opstal" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/7264.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Chris Van Opstal" /> </a> <div class="s-user-card--info"> <a href="../../users/7264/chris-van-opstal" class="s-user-card--link">Chris Van Opstal</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">36,423</li> <li class="s-award-bling s-award-bling__gold" title="9 gold badges">9</li> <li class="s-award-bling s-award-bling__silver" title="73 silver badges">73</li> <li class="s-award-bling s-award-bling__bronze" title="90 bronze badges">90</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-12534417"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>3</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status answered-accepted"> <strong>6</strong> answers </div> </div> </div> <div class="summary"> <h3><a href="../../questions/12534417/how-to-execute-multiple-clientscript-registerstartupscript-in-asp-net-c" class="question-hyperlink">How to execute multiple ClientScript.RegisterStartupScript in ASP.NET c#?</a></h3> <div class="excerpt">I'm developing a gridview in which you can download multiple files with one button. Here's my gridview: <asp:GridView ID="grdvHistorialMensajes" runat="server" AllowPaging="True" AutoGenerateColumns="False" CellPadding="4"…</div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/c#" class="post-tag grid--cell" title="show questions tagged 'c#'" rel="tag">c#</a> <a href="../../questions/tagged/asp.net" class="post-tag grid--cell" title="show questions tagged 'asp.net'" rel="tag">asp.net</a> <a href="../../questions/tagged/response.write" class="post-tag grid--cell" title="show questions tagged 'response.write'" rel="tag">response.write</a> <a href="../../questions/tagged/registerstartupscript" class="post-tag grid--cell" title="show questions tagged 'registerstartupscript'" rel="tag">registerstartupscript</a> <a href="../../questions/tagged/clientscript" class="post-tag grid--cell" title="show questions tagged 'clientscript'" rel="tag">clientscript</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Sep 21 '12 at 16:27">asked Sep 21 '12 at 16:27</time> <a href="../../users/1576411/victor" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1576411.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="Victor" /> </a> <div class="s-user-card--info"> <a href="../../users/1576411/victor" class="s-user-card--link">Victor</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">1,108</li> <li class="s-award-bling s-award-bling__gold" title="9 gold badges">9</li> <li class="s-award-bling s-award-bling__silver" title="29 silver badges">29</li> <li class="s-award-bling s-award-bling__bronze" title="53 bronze badges">53</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="mln24"> <div class="question-summary" id="question-summary-11339807"> <div class="statscontainer"> <div class="stats"> <div class="vote"> <div class="votes"> <span class="vote-count-post"><strong>3</strong></span> <div class="viewcount">votes</div> </div> </div> <div class="status "> <strong>1</strong> answer </div> </div> </div> <div class="summary"> <h3><a href="../../questions/11339807/textboxwatermarkextender-losing-text-after-response-write" class="question-hyperlink">TextBoxWatermarkExtender losing text after Response.Write</a></h3> <div class="excerpt">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. </div> <div class="grid ai-start jc-space-between fw-wrap"> <div class="grid gs4 fw-wrap tags "> <a href="../../questions/tagged/c#" class="post-tag grid--cell" title="show questions tagged 'c#'" rel="tag">c#</a> <a href="../../questions/tagged/asp.net" class="post-tag grid--cell" title="show questions tagged 'asp.net'" rel="tag">asp.net</a> <a href="../../questions/tagged/textbox" class="post-tag grid--cell" title="show questions tagged 'textbox'" rel="tag">textbox</a> <a href="../../questions/tagged/watermark" class="post-tag grid--cell" title="show questions tagged 'watermark'" rel="tag">watermark</a> <a href="../../questions/tagged/response.write" class="post-tag grid--cell" title="show questions tagged 'response.write'" rel="tag">response.write</a> </div> <div class="started mt0"> <div class="s-user-card s-user-card"> <time class="s-user-card--time" datetime="asked Jul 05 '12 at 07:38">asked Jul 05 '12 at 07:38</time> <a href="../../users/1501949/b10" class="s-avatar s-avatar__32 s-user-card--avatar"> <img class="s-avatar--image" src="../../users/profiles/1501949.webp" data-jdenticon-width="32" data-jdenticon-height="32" data-jdenticon-value="B10" /> </a> <div class="s-user-card--info"> <a href="../../users/1501949/b10" class="s-user-card--link">B10</a> <ul class="s-user-card--awards"> <li class="s-user-card--rep" title="reputation score">173</li> <li class="s-award-bling s-award-bling__silver" title="1 silver badges">1</li> <li class="s-award-bling s-award-bling__bronze" title="11 bronze badges">11</li> </ul> </div> </div> </div> </div> </div> </div> </div> <div class="s-pagination pager fr"> <a class="s-pagination--item" href="../../questions/tagged/response.write_page=1" rel="prev" title="Go to page 1">Prev </a> <a class="s-pagination--item" href="../../questions/tagged/response.write_page=1" rel="" title="Go to page 1">1</a> <div class="s-pagination--item is-selected">2</div> <a class="s-pagination--item" href="../../questions/tagged/response.write_page=3" rel="" title="Go to page 3">3</a> <div class="s-pagination--item s-pagination--item__clear">…</div> <a class="s-pagination--item" href="../../questions/tagged/response.write_page=9" rel="" title="Go to page 9">9</a> <a class="s-pagination--item" href="../../questions/tagged/response.write_page=10" rel="" title="Go to page 10">10</a> <a class="s-pagination--item" href="../../questions/tagged/response.write_page=3" rel="next" title="Go to page 3"> Next</a> </div> </div> </div> </div> </div> <script src="../../static/js/stack-icons.js"></script> <script src="../../static/js/fromnow.js"></script> </body> </html>