.net - How does returning a text from controller without a view show it in browser? -


this might silly question i'm curious , i'm sure i'll end knowing more what's going on.

in typical .net mvc website, if create controller without view , return string index() function, string show in browser.

so, without view, how happen ?

my understanding server returns string , browser shows it. simple that. means browser creates html include text? feel i'm missing core concepts of web here.

would appreciate details.

browsers can read text, html, jpeg, xml, json, pdf , lot of other formats. aren't html exclusive.

when return string, mvc doing writing response directly return buffer (aka response body) , setting content-type plain/text (i think?).

and browser display server served.


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -