Web Connection
How to send file content only
Gravatar is a globally recognized avatar based on your email address. How to send file content only
  Steve
  All
  Jan 27, 2020 @ 09:12am

Hi All, and Happy New Year!!

I am working on a small WWWC project and need to send a response that contains mainly the contents of a string, with minimal html code in the response. Using This.StandardPage is returning the needed value and I can parse the response to extract what I am looking for.

Is there an easier way or better function I can use to return the string content with minimum html code? The response will not be displayed in a browser.

TIA,
Steve

Gravatar is a globally recognized avatar based on your email address. re: How to send file content only
  Rick Strahl
  Steve
  Jan 27, 2020 @ 11:44am

Sure...

* Response.ContentType = "application/json"  && for non HTML content specify
Response.Write(lcString)

Writes out the raw string and nothing else. You can use it for text or binary content. Just make sure to set the ContentType if you're sending something other than HTML.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: How to send file content only
  Steve
  Rick Strahl
  Jan 27, 2020 @ 07:14pm

Ah, so easy!! Thanks Rick!!

© 1996-2020