-1

Is there any difference between

var stringValue = '<%=GetStringValue();%>';

and calling the same codebehind function via ajax?

Both take parameters easily enough, and seem to occur at the same point in the lifecycle (eg after the client is fully loaded, server tags do not preload). The only difference I can see is that ajax web methods have to be public static while the static can be omitted for a server tag.

Are there any security differences, and are the above assertions correct?

Devin D
  • 98
  • 11
  • please explain better, even "Server tag function calls vs AJAX web methods " doesnt really make sense. What server tags calls and how are you relating these in a question of vs. – Seabizkit Feb 19 '18 at 13:02

1 Answers1

0

The difference is that

In Ajax WebMethod you can make an async call. eg.load full webpage and then bind the heavy data.

Whereas in a tag, it will wait for the method to get the data and webpage loading will be quite lazy