View not update after POST although View Model updatedParse JSON in C#How do I import a namespace in Razor View Page?Escape @ character in razor view enginePassing Data between View ControllersHow should a model be structured in MVC?Values from View to Controller not recievedView Could Not Be FoundASP.NET Core Entity Model Automatically Maps to View Modelcall property to populate in modelView History of payment and update it in database

Crop image to path created in TikZ?

extract characters between two commas?

Add an angle to a sphere

Domain expired, GoDaddy holds it and is asking more money

Could Giant Ground Sloths have been a good pack animal for the ancient Mayans?

How to answer pointed "are you quitting" questioning when I don't want them to suspect

Is it legal to have the "// (c) 2019 John Smith" header in all files when there are hundreds of contributors?

Is Social Media Science Fiction?

How to make payment on the internet without leaving a money trail?

aging parents with no investments

How could a lack of term limits lead to a "dictatorship?"

Is this food a bread or a loaf?

Lied on resume at previous job

Can a planet have a different gravitational pull depending on its location in orbit around its sun?

Does the average primeness of natural numbers tend to zero?

Are cabin dividers used to "hide" the flex of the airplane?

Is it wise to focus on putting odd beats on left when playing double bass drums?

I’m planning on buying a laser printer but concerned about the life cycle of toner in the machine

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

Why do UK politicians seemingly ignore opinion polls on Brexit?

Can I find out the caloric content of bread by dehydrating it?

Why airport relocation isn't done gradually?

Does bootstrapped regression allow for inference?

What does 'script /dev/null' do?



View not update after POST although View Model updated


Parse JSON in C#How do I import a namespace in Razor View Page?Escape @ character in razor view enginePassing Data between View ControllersHow should a model be structured in MVC?Values from View to Controller not recievedView Could Not Be FoundASP.NET Core Entity Model Automatically Maps to View Modelcall property to populate in modelView History of payment and update it in database






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I am writing ASP.NET Custom Component, I want to update my view with following code below:



 @if (Model.TableDatasource != null)
//Write some thing to html page example: tables or span




At the first, Model.TableDatasource is null, user choose information and Controller Review View(Model) like this:



var model = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
;

if (request == null)

return View(model);

else

var currentPlant = JsonConvert.DeserializeObject<PlantList>(request);

var FullModel = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
CurrentPlant = JsonConvert.DeserializeObject<PlantList>(request),
DriverList = JsonConvert.DeserializeObject<List<Drivers>>(CommonHelper.GetDriver(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
CustomerList = JsonConvert.DeserializeObject<List<Customer>>(CommonHelper.GetCustomer().Content.ReadAsStringAsync().Result),
RecipeList = JsonConvert.DeserializeObject<List<Recipe>>(CommonHelper.GetRecipe(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
SitesList = JsonConvert.DeserializeObject<List<Site>>(CommonHelper.GetSite().Content.ReadAsStringAsync().Result),
// TruckList = JsonConvert.DeserializeObject<List<Truck>>(CommonHelper.GetTruck().Content.ReadAsStringAsync().Result)
;

return View(FullModel);




At the Debug time, I notice that break-point stop at return View(FullMode) and Break-point at ViewFile(cshtml) has value. but nothing printed at view.



Hope some help.










share|improve this question






















  • IS this all controller code?

    – JamesS
    Mar 8 at 10:12











  • Yes. That all. I had send post to this controlller and as you can see. I return View with model

    – Bui Quy
    Mar 8 at 11:20


















0















I am writing ASP.NET Custom Component, I want to update my view with following code below:



 @if (Model.TableDatasource != null)
//Write some thing to html page example: tables or span




At the first, Model.TableDatasource is null, user choose information and Controller Review View(Model) like this:



var model = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
;

if (request == null)

return View(model);

else

var currentPlant = JsonConvert.DeserializeObject<PlantList>(request);

var FullModel = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
CurrentPlant = JsonConvert.DeserializeObject<PlantList>(request),
DriverList = JsonConvert.DeserializeObject<List<Drivers>>(CommonHelper.GetDriver(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
CustomerList = JsonConvert.DeserializeObject<List<Customer>>(CommonHelper.GetCustomer().Content.ReadAsStringAsync().Result),
RecipeList = JsonConvert.DeserializeObject<List<Recipe>>(CommonHelper.GetRecipe(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
SitesList = JsonConvert.DeserializeObject<List<Site>>(CommonHelper.GetSite().Content.ReadAsStringAsync().Result),
// TruckList = JsonConvert.DeserializeObject<List<Truck>>(CommonHelper.GetTruck().Content.ReadAsStringAsync().Result)
;

return View(FullModel);




At the Debug time, I notice that break-point stop at return View(FullMode) and Break-point at ViewFile(cshtml) has value. but nothing printed at view.



Hope some help.










share|improve this question






















  • IS this all controller code?

    – JamesS
    Mar 8 at 10:12











  • Yes. That all. I had send post to this controlller and as you can see. I return View with model

    – Bui Quy
    Mar 8 at 11:20














0












0








0








I am writing ASP.NET Custom Component, I want to update my view with following code below:



 @if (Model.TableDatasource != null)
//Write some thing to html page example: tables or span




At the first, Model.TableDatasource is null, user choose information and Controller Review View(Model) like this:



var model = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
;

if (request == null)

return View(model);

else

var currentPlant = JsonConvert.DeserializeObject<PlantList>(request);

var FullModel = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
CurrentPlant = JsonConvert.DeserializeObject<PlantList>(request),
DriverList = JsonConvert.DeserializeObject<List<Drivers>>(CommonHelper.GetDriver(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
CustomerList = JsonConvert.DeserializeObject<List<Customer>>(CommonHelper.GetCustomer().Content.ReadAsStringAsync().Result),
RecipeList = JsonConvert.DeserializeObject<List<Recipe>>(CommonHelper.GetRecipe(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
SitesList = JsonConvert.DeserializeObject<List<Site>>(CommonHelper.GetSite().Content.ReadAsStringAsync().Result),
// TruckList = JsonConvert.DeserializeObject<List<Truck>>(CommonHelper.GetTruck().Content.ReadAsStringAsync().Result)
;

return View(FullModel);




At the Debug time, I notice that break-point stop at return View(FullMode) and Break-point at ViewFile(cshtml) has value. but nothing printed at view.



Hope some help.










share|improve this question














I am writing ASP.NET Custom Component, I want to update my view with following code below:



 @if (Model.TableDatasource != null)
//Write some thing to html page example: tables or span




At the first, Model.TableDatasource is null, user choose information and Controller Review View(Model) like this:



var model = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
;

if (request == null)

return View(model);

else

var currentPlant = JsonConvert.DeserializeObject<PlantList>(request);

var FullModel = new PrintDeliveryTicketModel()

PlantList = CommonHelper.GetPlantList(),
CurrentPlant = JsonConvert.DeserializeObject<PlantList>(request),
DriverList = JsonConvert.DeserializeObject<List<Drivers>>(CommonHelper.GetDriver(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
CustomerList = JsonConvert.DeserializeObject<List<Customer>>(CommonHelper.GetCustomer().Content.ReadAsStringAsync().Result),
RecipeList = JsonConvert.DeserializeObject<List<Recipe>>(CommonHelper.GetRecipe(currentPlant.CodePlant, currentPlant.PlantNo.Value).Content.ReadAsStringAsync().Result),
SitesList = JsonConvert.DeserializeObject<List<Site>>(CommonHelper.GetSite().Content.ReadAsStringAsync().Result),
// TruckList = JsonConvert.DeserializeObject<List<Truck>>(CommonHelper.GetTruck().Content.ReadAsStringAsync().Result)
;

return View(FullModel);




At the Debug time, I notice that break-point stop at return View(FullMode) and Break-point at ViewFile(cshtml) has value. but nothing printed at view.



Hope some help.







asp.net razor model-view-controller






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 7:13









Bui QuyBui Quy

32




32












  • IS this all controller code?

    – JamesS
    Mar 8 at 10:12











  • Yes. That all. I had send post to this controlller and as you can see. I return View with model

    – Bui Quy
    Mar 8 at 11:20


















  • IS this all controller code?

    – JamesS
    Mar 8 at 10:12











  • Yes. That all. I had send post to this controlller and as you can see. I return View with model

    – Bui Quy
    Mar 8 at 11:20

















IS this all controller code?

– JamesS
Mar 8 at 10:12





IS this all controller code?

– JamesS
Mar 8 at 10:12













Yes. That all. I had send post to this controlller and as you can see. I return View with model

– Bui Quy
Mar 8 at 11:20






Yes. That all. I had send post to this controlller and as you can see. I return View with model

– Bui Quy
Mar 8 at 11:20













0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55058415%2fview-not-update-after-post-although-view-model-updated%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55058415%2fview-not-update-after-post-although-view-model-updated%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

1928 у кіно

Захаров Федір Захарович

Ель Греко