16,007,443 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 11794209 (Top 10 by date)
Member 11794209
17-Jul-15 10:39am
View
@model IEnumerable<mvcapplication3.models.loginmodel>
[httppost]
public actionresult update(formcollection form){
not getting the table values here how can i pass table values
}
Member 11794209
17-Jul-15 9:44am
View
I am binding the values to the table using foreach condition after edit i want to pass values from table to controller how can i pass please help me
@model IEnumerable<mvc5_sessions.models.product>
@{
ViewBag.Title = "Index";
}
Index
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table class="table">
<tr>
<th>
@Html.DisplayNameFor(model => model.ProductId)
</th>
<th>
@Html.DisplayNameFor(model => model.ProductName)
</th>
<th>
@Html.DisplayNameFor(model => model.UnitPrice)
</th>
<th>
@Html.DisplayNameFor(model => model.Category.CategoryName)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.ProductId)
</td>
<td>
@Html.DisplayFor(modelItem => item.ProductName)
</td>
<td>
@Html.DisplayFor(modelItem => item.UnitPrice)
</td>
<td>
@Html.DisplayFor(modelItem => item.Category.CategoryName)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.ProductId }) |
@Html.ActionLink("Details", "Details", new { id=item.ProductId }) |
@Html.ActionLink("Delete", "Delete", new { id=item.ProductId })
</td>
</tr>
}
</table>
Member 11794209
17-Jul-15 1:28am
View
i want to save both id and text in the same table how can i do it
Member 11794209
16-Jul-15 10:26am
View
while saving i want to save the dropdown text in db and i want to bind that text in another view page in form loading [httpget]method
Member 11794209
16-Jul-15 10:02am
View
@model MvcApplication2.Models.EmployeeDetails
@using (Html.BeginForm()) {
@Html.LabelFor(m => m.name)
@Html.TextBoxFor(m => m.name)
@Html.DropDownList("istateid", (SelectList)ViewBag.stateList, "--Choose Your State--")
@Html.DropDownList("icityid", (IEnumerable<SelectListItem>)ViewBag.cityList, "--Choose Your City--")
@Html.DropDownList("iareaid", (IEnumerable<SelectListItem>)ViewBag.areaList, "--Choose Your Area--")
<input type="submit" value="submit" />
}
IN CONTROLLER
[HttpPost]
public ActionResult postyourad(EmployeeDetails value)
{
we can get the normal textbox value directly and dropdown value will bind and i need to bind the dropdown text
}
Member 11794209
16-Jul-15 10:01am
View
Deleted
@model List<mvcapplication2.models.employeedetails>
@using (Html.BeginForm()) {
@Html.LabelFor(m => m.name)
@Html.TextBoxFor(m => m.name)
@Html.DropDownList("istateid", (SelectList)ViewBag.stateList, "--Choose Your State--")
@Html.DropDownList("icityid", (IEnumerable<SelectListItem>)ViewBag.cityList, "--Choose Your City--")
@Html.DropDownList("iareaid", (IEnumerable<SelectListItem>)ViewBag.areaList, "--Choose Your Area--")
<input type="submit" value="submit" />
}
IN CONTROLLER
[HttpPost]
public ActionResult postyourad(EmployeeDetails value)
{
we can get the normal textbox value directly and dropdown value will bind and i need to bind the dropdown text
}
Member 11794209
16-Jul-15 8:54am
View
i don't use jquery and javascript
i am mvc razor code
@using (html(BeginForm()){
<input type="submit" id="btnsave" value="save"/>
}
While Pressing the button the values will be binded in controller using formcollection class and i can't bind the drop down text using formcollection can u guide me
Member 11794209
9-Jul-15 2:12am
View
can u send the view and controller codeings
Member 11794209
9-Jul-15 1:10am
View
How can i pass dropdown selected text to controller without using jquery,Javascript
[httppost]
public ActionResult YourAction(formcollection product)
{
// DROPDOWN TEXT VALUE IS NULL
}
Member 11794209
9-Jul-15 1:08am
View
Deleted
[httppost]
public ActionResult YourAction(formcollection product)
{
//NO DROPDOWN TEXT VALUE IS NULL
}
Show More