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
Adalat Khan
652
1.5k
866.7k
MVC Core Web Application
Sep 26 2018 7:56 PM
I have one Dropdown List and one TextBox control in my View. The Dropdown list contains branch codes and when i select the branch code i want to display its associated branch name in the TextBox control. I created the following action Method:
public string RerieveBranchName(string id)
{
var branchName = from e in dbContext.CompanyBranches
where e.BranchCode == id
select e;
ViewBag.SelectedBranchID = branchName.ToString();
return "0";
}
Now my problem is how to pass the branch id to the action method when i select it from the dropdown list and after passing the branch id how to return the result and display in the TextBox.
Please help me. Thanks in advance
Please write your code in Razor syntax. Thanks again
Reply
Answers (
2
)
form validation code will not work
How to avoid browsers blocking popups when using window.open