RonenNess / Serverito

Http framework for C# web apps.
MIT License
9 stars 0 forks source link

Render View with Model #2

Closed sml01 closed 4 years ago

sml01 commented 4 years ago

Possible to have server.ServeHtmlPage(context, model, "index.html");

index.html will automatically generate view with model.

RonenNess commented 4 years ago

Hi @sml01 I'm not sure I understand what you're asking, are you asking if serverito supports html templates like with Django for example that you can use variables inside the html?

Thanks

sml01 commented 4 years ago

Hi, yes something like that. and Razor able to use model.

For example, if I want to display field of model, model.displayName..

thanks

RonenNess commented 4 years ago

Thanks for the feedback, but Serverito's focus is to handle just networking. Templating is a whole other subject and should be a framework of its own.

Edit: Sorry hit the button too soon :) Anyway why not just using external lib for templating? Are you having problems integrating?