6
Başka bir eylem için bir dize ve model (nesne) göndermek istiyorum. Ben nesneleri hSm
özelliğini ayarlayın rağmen model ve parametreyi RedirectToAction ile iletme
var hSM = new HotelSearchModel();
hSM.CityID = CityID;
hSM.StartAt = StartAt;
hSM.EndAt = EndAt;
hSM.AdultCount = AdultCount;
hSM.ChildCount = ChildCount;
return RedirectToAction("Search", new { culture = culture, hotelSearchModel = hSM });
Ben, bu
null
nesne gönderir
new
anahtar kelime kullanın.
Bu benim Search
eylemdir:
public ActionResult Search(string culture, HotelSearchModel hotelSearchModel)
{
// ...
}