ASP.NET MVC Fundamentals - Part 03 - HTTP POST, ViewData, ModelState, Model, ViewModel

preview_player
Показать описание
-How to do HTTP POST using ASP.NET MVC
-How to send data from controller/action to view using ViewData
-How to send data from controller/action to view using ViewModel
-How to fetch posted values using "Request" object, "FormCollection", Action parameters, POST based View Models
-How to use "Model" object (in "View") effectively
-How to use "Html Helpers" effectively
-Understanding "ModelState" object
-How to post textbox values to controller/action
-How to post and work with "posted" View Models
Рекомендации по теме
Комментарии
Автор

Good work explaining all the ways to post and store values.

eel
Автор

Great video! I was stuck on something and at the end you cover my issue. ModelState.Clear(). Thank you for taking the time to post this.

jorgehuerta
Автор

Do you have a video where you have a web image and send it over to controller on post-back to save on the server? I am making an application where a webcam is used to capture a picture and stored on a canvas. Then when I try to upload the image the post back erases it. Thank you your videos are helpful.

yegorberdyugin
Автор

Hi, what if I need to return a List<> from the controller? And I need to display it in a table. And that table will only show after postback. I need your help, thanks!

pikachickfarm
Автор

Great video and very informative. Thank you very much.

wastabirrajvee
Автор

@Tech CBT....This is excellent. Your videos are very helpful for me to understand concepts and techniques as a beginner. Nicely explained with examples. Great job! A BIG Thank for your effort and time. If possible, please make some videos using Entity Framework. Thanks.

candlelight-relaxingmusic
Автор

var sum = int.Parse(txtFirstNo) + int.Parse(txtSecondNo); i have null argument exception. Will u please help me out?

anurawat
Автор

Good tutorial.Nice explanations. Thanks master..

yatri
Автор

Thank you for this video sir!
Just wished you talked a little bit more about model binding. Keep up the good work.

emanuelfaisca
Автор

This is very nice work. In the portion just after you create Sample03 (controller and view) you run to check progress, but mistakenly run the Sample01 controller again. The you notice that you lost the two values (txtFirstNo and txtSecondNo) - it would have worked at that point if you were on the correct URL (/Sample03/Index, not Sample01/Index). It is at 1:08:28 in the video.

Minor catch - but a great video and explanation nonetheless.

Joel_Powell
Автор

Great work post other videos about ajax and Jquery too

sohailanjum
Автор

Please Add more with models approach and database connectivity with model classes

usmanshahzadful
Автор

did anyone notice this? 1:08:12 he said that he need to add Sample03 but he actually added Sample01.... :p

preetishikhatete
Автор

public ActionResult Addtion(string txtfirst, string txtsecond)
{
var sum = int.Parse(txtfirst) + int.Parse(txtsecond);
ViewData["sum"] = sum;
return View();
}


@using(Html.BeginForm("Addtion", "Home", FormMethod.Post))
{
// @ViewBag.Message;
<p> Enter 1st Value :</p>
@Html.TextBox("txtfirst");


<p> Enter 2st Value :</p>
@Html.TextBox("txtsecond");
<br /> <br /> <br />

<button type="submit" >input</button>


@ViewData["sum"];
}

i get argumentnullexeption was not hendle by user code

jdshah