© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•2y ago•
6 replies
massiyi

2 actions in one method

Hey there, I am new to C# and ASP.NET, what I am trying to accomplish now is to make account area where person updates details regarding their account. However no luck passing file and some form fields together. Any help, please? Using ASP.NET Core 8 and MVC 5. Thanks in advance.

[HttpPost]
[Authorize]
public async Task<IActionResult> Settings(IFormFile profilePhoto)
{
  ...
}

[HttpPost]
[Authorize]
public async Task<IActionResult> Settings(UserSettingsVM model)
{
  ...
}
[HttpPost]
[Authorize]
public async Task<IActionResult> Settings(IFormFile profilePhoto)
{
  ...
}

[HttpPost]
[Authorize]
public async Task<IActionResult> Settings(UserSettingsVM model)
{
  ...
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

i have a variable in one method and want to use it in a different one
C#CC# / help
4y ago
interface vs extension method vs method in class
C#CC# / help
3y ago
Chaining async methods. Method not found
C#CC# / help
3y ago
What return method is appropriate for controller actions for SPA frontend?
C#CC# / help
2y ago