jeudi 18 juin 2015

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

This might be a very silly question but I'm just curious and I'm sure I'll end up knowing more about what's going on.

In a typical .NET MVC website, if you create a controller without any view and return a string from the Index() function, the string will show up in browser.

So, without a view, how does this happen ?

My understanding is that server returns a string and the browser just shows it. As simple as that. So that means browser creates the HTML to include the text? I feel I'm missing some core concepts of web here.

Would appreciate some details.

Aucun commentaire:

Enregistrer un commentaire