V
V
viktorulyushev2017-05-25 09:08:54
ASP.NET
viktorulyushev, 2017-05-25 09:08:54

How to transfer a property from one view to another?

There is a view in which the layout lies and the property is transferred there

@using AdvantShop.Customers
@using AdvantShop.Security
@model AdvantShop.ViewModel.ProductDetails.ProductDetailsViewModel

    @if (product.Weight != 0 && SettingsCatalog.DisplayWeight)
    {
        <div class="details-row details-weight">
            <div class="details-param-name">@T("Product.ProductInfo.Weight"):</div>
            <div class="details-param-value"><div class="inplace-offset details-param-value-weight" @Html.InplaceProduct(product.ProductId, ProductInplaceField.Weight, true)>@product.Weight</div> @T("Product.ProductInfo.Kg")</div>
        </div>
    }

I do not quite understand how to transfer this property to another view?
@using AdvantShop.Core.Common.Extensions
@using AdvantShop.ViewModel.Compare
@using AdvantShop.ViewModel.ProductDetails

@using AdvantShop.Catalog
@using AdvantShop.Core.Modules
@using AdvantShop.Core.Modules.Interfaces

@model AdvantShop.ViewModel.Catalog.ProductViewModel

.....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artem, 2017-05-25
@devspec

1. Via ViewBag
2. Via GET URL parameter
3. Via cookie
4. Via localStorage
5. Via session
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question