Now it's time to work on the details for you.
We can quite click on the action matter here and select Add View.
You can either select the empty place there view and then you will have to rename the View based on
the action method.
But if you select the reserve you, you can see the view name is automatically populated.
Then template will be empty.
But this will not be a partial view, so we can uncheck that and hit the add button.
So you can see we can use both the options that are available when we are creating use, when you use
this approach.
We have some new data and details that is populated.
We will remove all of that.
Let's make sure that you got added in the correct location set inside areas.
We have home folder in that we have details.
That is perfect.
You should first think of what will be the model of this view.
That is the first question you should ask for, and if you are razor pages that you create inside home
controller details, we are passing a shopping cart object so we can copy that and paste that here for
our model.
It is not able to read that.
Let's see where we have our model.
This model, we placed it inside view model.
It should actually be, in fact, the model's folder because we will be adding shopping cart to database
pretty soon.
So that will open this and make sure the namespace is correct.
It will be models.
And with that, it should recognize the shopping cart now.
Perfect.
Now what do we want to display here?
We want to display all the details of the product.
So rather than wasting our time, I have provided snippets that you can see on the lecture project resources
in the first section in there.
If your download project resources from Darknet Mastery and open them, you will see all the files.
We will go to the attachments.
Here we are in Section seven.
We have the details.
You, I, you will copy everything here and paste it inside to view once you examine what you pasted.
There won't be any C-sharp code.
It is just HDMI.
A. Yes, so that's great.
We always want to save our time with HDMI and CSX before we run our application.
Let's go to the index page.
Here we are navigating to the details section and we are passing the speed at which is the product title
since we are passing that ID.
We are retrieving that here and everything should work.
So let's run the application and see what happens.
So let's hit the details button and perfect, we have our template that is up and running.
We just need to replace all of this dummy text with the actual text from our shopping cart dot product
object.
So let's go back and let's do that inside the details right here.
Let me just add some padding top up.
For first thing, we have time to do so in order to access model.
We have Capital M Model Dot Product title.
Let me just copy the Model Dot product page it before after we have Model Dot product author.
Next, we want cover tight inside that we want to extract the name of the cover type and same will be
valid for a category.
Whether it's scroll down, we have the ISBN, so model dot product Dot ISBN.
Next, we want to display the list price here.
So model stock product list, right?
And we want to convert that to currency so we can use to a string and we will try to see between that
for currency that may copy the currency because here we need to display all the three price.
You can see we have price for one two fifty fifty one, two hundred and hundred plus so far point fifty.
We have price for fifty one two hundred.
We have price fifty.
And last one will be price, right?
Let's scroll down, we have the description.
So it's a model tart product description.
Let me save all of this.
Go back and refresh.
Everything is coming along good.
We have title author, cover type and category, and the price are also looking good right away.
We have the description you can see it is adding the HDR content.
That is because we have rich text editor for our description.
So if you want to display Gmail, you will have to use HDMI 2.0 and within here you will pass the HDMI
content that is inside description.
Let's save that and refresh.
And this looks much better.
Next, we have to count here this we can find with that model.
So instead of input, we can use ESP for tag helper and we want to bind this with count that way.
Now, if you refresh, that default should be one because we are setting the default inside the home
controller right here.
So that looks great on the right side here.
We want to display that image.
So if we go back to details, I have the image as I see here, where we'll go to model dark product
starting that, you know, let's refresh that.
And this looks much better.
Let's consider that back to last year.
I thought, let me say back to home.
And on this action method, it should go back to action of index.
Liked what we have is add to cart button and we have type of segment.
We have everything inside the phone tag.
So when it is submitted where there's no like, what's the product, let's refresh back to home is functional.
So with that, the details page of our shopping cart looks good.
Let's continue from the next section.