C
C
Chamyys2018-08-30 11:24:07
ASP.NET
Chamyys, 2018-08-30 11:24:07

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

1 answer(s)
V
Victor P., 2018-08-30
@Jeer

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 question

Ask a Question

731 491 924 answers to any question