ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Passing object to grid action from api [ASP CORE]
Title:
B
I
{code}
?
I'm currently trying to pass an the view model through the `api.load` params: view: @model using Test.TestModel var data = @Json.serialize(Model)); // data = {"serverType":1,"brandId":null,"epochVersion":null}; api.load({model: data}); controller: public IActionResult GetItems (TestModel model) { var test = model; // model will be null and value are not populated Is there a way to populate the `GetItems` action the current view model into the action?
Save Changes
Cancel
yc
asked at 25 Feb 2021
try `api.load({ params: { model: data }});` https://demo.aspnetawesome.com/GridDemo/ClientSideApi you could also send this model using parameters: https://www.aspnetawesome.com//learn/mvc/general#Predefined-parameters
at 25 Feb 2021
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK