0

I have a public static function that returns a string (WebMethod).

I want to put this string in an HTML element.

If the string has a small length, it's ok. However, when the length is too big, I get a 500 error.

My solution is writing the string in a .txt file and reading the file in a JavaScript function.

But I don't know if it is the best solution. Is there another way to solve this problem?

Ricardo Peres
  • 13,724
  • 5
  • 57
  • 74
Catarina
  • 59
  • 1
  • 2
  • 8
  • what are you trying to achieve/solve?, do you want to render an HTML page on the client-side? please provide the code snippet and update the question for better context. – Aarif Feb 14 '20 at 10:11
  • 2
    See an answer here: https://stackoverflow.com/questions/13915953/return-large-string-from-ajax-call-using-jquery-to-web-method-of-asp-net. – Ricardo Peres Feb 14 '20 at 11:00

0 Answers0