Answer the question
In order to leave comments, you need to log in
How to automatically generate a View?
Good afternoon! Is it possible to generate a View that will be created using, for example, a generated string? Those. I receive a string from the client, which I must use in the name of the View and display some information in it. In what way can this be done?
Answer the question
In order to leave comments, you need to log in
You don't need to generate a View.
You receive a request from a user with some parameters. For example, with some string.
Next, in the controller, you get a certain model.
Then, you can pass this model to the template engine (in your case, Razor).
It is engaged in the fact that, based on some dynamic data (from the model), it generates an html layout that is sent back to the client.
You can call different templates (by name), but they must be created in advance.
Describe the task in more detail, it's so hard to talk abstractly.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question