httppost edit action in asp net core mvc

preview_player
Показать описание
In this video we will discuss how to handle and process the posted edit view. So in short, we want to implement Edit() action that responds to HttpPost.

When the Edit view is posted to the server by clicking the Update button, we want to handle and process the posted form data.

Healthy diet is very important for both body and mind. We want to inspire you to cook and eat healthy. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking.

Text version of the video

Slides

ASP.NET Core Text Articles & Slides

ASP.NET Core Tutorial

Angular, JavaScript, jQuery, Dot Net & SQL Playlists
Рекомендации по теме
Комментарии
Автор

This is the first time I've been this consistent in learning something and all the credits got to you sir!! Thanks

abhishekbajpai
Автор

Fantastic. There are a lot of .NET nuances involved in this sole video. Thank you.

CarlosWashingtonMercado
Автор

Thank you for the videos. Everything makes sense if you start from first video.

Migzit
Автор

For anyone else who might have had a similar issue:
I was getting an error for both FileName and System.IO.Filestream conversion to iformfile... This was due to the "EmployeeCreateViewModel" class having the "Photo" property still being set to "List<IFormFile>" I recall a Venkat mentioning on about 2-3 videos back that he was going to undo some of the changes made to display multiple picture attachments.(with jquery) but I guess I forgot to undo these changes/options.

Removing the "List<>" from the "IFormFile" should then allow you to access the "FileName" property within the IFormFile class and then remove those errors.

ArchPendragon
Автор

I should have watched that process busy error xD. Thank you.

_samirdahal
Автор

Good Day Sir, I just wanted to know when the ASP.NET Core Tutorial Series will come to a close? Not Withstanding thank you very sir for your videos they have been very helpful so far. Landed a job showing this project so far as Proof of Expertise

olajideosho
Автор

a little bit confusing but it will be clear after re view the video again and again thanks a lot

MmMm-tgmq
Автор

At first I was really curious about asp.net core mvc and I tried to implement authentication and authorization with Identity which I ended up with a mix of mvc and razor pages app. As the login system for identity is build with razor pages by default, converting to mvc is a waste of developer time. A poor architecture design by the team. I am waiting for Kudvenkat that how he is going to help us on demonstrating the whole registration system with identity framework without touching the razor pages.

kifkifa
Автор

would be nice if you mention here case when model is not valid in post action...
and how you would repopulate dropdown control.
Some people say it is good to requery storage for lookup values, some use cache, some other ways...
Wonder how would you do that -)

basilio
Автор

Looks like EF-CORE doesn’t support stored procedures in a straight forward way, is that reason you’re using data changes directly on tables ?

srikanthek
Автор

One Question, If we use the hidden field to add the id to the form that means anyone who inspects the page can see it.
Is that okay to do?
That should be sensitive information, maybe there is another way we can get the id without showing it on the page.

LAdR
Автор

Hi sir, I want to make my application such that when client clicks update page won't be reloaded cause it took really long time to complete some processes and add it to database in the background and web page stays at "loading" state all along. How can I achieve that?

mutalibgozalov
Автор

You never close the explorer chrome window . How do you do that?

ualvarez
Автор

I am having issues with the edit post, I have to re-upload the image every time I am making changes. I am asking for help to fix this issue.

kertdixon
Автор

Sir, 1 question, why we are using post method instead of put for updating data?

ritamghosh
Автор

I keep getting errors with your code. In the class EmployeeCreateViewModel, you have public List<IFormFile> Photos { get; set; } in one text file (Part 54) and in Part 55, you have public IFormFile Photo { get; set; }. This is creating errors for me:
CS0019 Operator '>' cannot be applied to operands of type 'method group' and 'int' EmployeeManagement 136 Active


And


CS1579 foreach statement cannot operate on variables of type 'IFormFile' because 'IFormFile' does not contain a public instance definition for 'GetEnumerator' EmployeeManagement 139 Active

josephregallis
Автор

When i try to edit i got;
" Cannot insert explicit value for identity column in table 'Employees' when IDENTITY_INSERT is set to OFF. "
error, anyone knows the solution ?

caranthirn
Автор

shouldn't it be put instead of post?

get_ready
Автор

interesting part is using var fileStream...

seneysean
Автор

When you going to post tutorials for Blazor?

MrLohityakumar