TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Hakan Axheim
NA
201
33k
Sending a parameter from a Controller to a FormModel
Apr 8 2020 8:32 AM
Hi,
I have a question regarding how to send a parameter from a Controller to a FormModel.
The parameter I have to send to the FormModel is created in the entity model.
This variable is a boolean that holds a value of true or false.
In my controller, I have an ActionResult method Edit that calls a method in the FormModel class.
How can I pass a parameter from the Controller method Edit to the FormModel.
As you see I am not that good at ASP.NET
This is an extract of my Edit method in Controller class:
- public ActionResult Edit(PrimaryCodeFormModel model)
var canEditCode = model.CanEditCode();
if (canEditCode)
{
return base.Edit(model);
}
When return base.Edit(model) will be called I end up in my FormModel which is called PrimaryCodeFormModel.cs
But how to send a parameter from the Controller to the Model?
Reply
Answers (
1
)
ASP.NET MVC Application is working very slow in IIS ?
Related data in tables using Entity Framework