Now, in a typical back form, what happens is we have a name for this input field and display order.
So when we post that insight that we try to extract that based on the name and we will see what value
was appended.
But with razor pages, we have something special.
We can find this input text directly to a category model and then we can use that model.
I'd rather have those values available inside the post handler so they can be binding this to a model
in order to find a way to a model.
We have to create that property or model inside the model of the way, which is create a model that
is inside this CDMO Darcy Yes.
So just like inside index, we created an AI enumerable of category, and then we find it that right
here to extract using model or categories, we can do something similar instead.
Create, don't see HTML.
We do not want and I innumerable, we just want one single category.
So we're going to create a category property and we can access this property inside a UI right here
inside the indexed HTML.
We saw the tag helper ASP page that is used to redirect.
Similarly, we have a tag helper that binds a property and that is SB four.
Here we have to write the name inside park model.
To extract that, we will need the air time.
We will have models don't.
And that is inside category.
Inside category, this is for name.
And with that, we also do not have to define any type or name.
Everything will be done automatically and all the fine things will be done within just had some bootstrap
classes for styling.
Now, this would create an input field.
Similarly, we have something for labor.
So if we have a label here and if we use ESP four, we can use activate model here.
But if you do not want to use the Activate model when you are using SB four, it is smart enough to
automatically bind the models so you can directly say a category if you want and don't name.
That is pretty simple, but if you don't see that option, you can always use at the model to access
everything in the model that is defined right here.
So we are just adding a label here with the tag helper of category name.
Let me copy these two lines and paste them our display order as well.
So they just have to change the property name to display order.
With that, let me see if the changes go back and refresh.
And we see this error because we also modified the DOT6 file.
We actually have to read and the project.
If it was just this year, Yemen or AQI, then we do not have to read and project.
So let's go to categories here.
And if they create new categories, we have name and display order.
Let me press F12 here and inspect element.
You can see on this element, it automatically populates the ID and name, and the fancy name is category
nickname.
So it does all of the binding, along with the Typekit codes to text automatically so you can see how
life gets easy with tech helpers.
Now, once we enter any of the details here and we hit the submit button, we want to fetch those details
inside the post handler.
We only have a cat handler right now, so let's add a post handler and continue from the next week,
you.