Click here to Skip to main content
15,886,362 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: format a string in Data Repeater (list array as a data source) Pin
Parwej Ahamad22-Sep-11 23:41
professionalParwej Ahamad22-Sep-11 23:41 
QuestionIssue with modalpopup on master page. Pin
shock58922-Sep-11 19:23
shock58922-Sep-11 19:23 
AnswerRe: Issue with modalpopup on master page. Pin
Parwej Ahamad22-Sep-11 23:24
professionalParwej Ahamad22-Sep-11 23:24 
AnswerRe: Issue with modalpopup on master page. Pin
jagdish Bhandari23-Sep-11 1:16
jagdish Bhandari23-Sep-11 1:16 
QuestionExport dataset to Excel Pin
countmein22-Sep-11 12:10
countmein22-Sep-11 12:10 
AnswerRe: Export dataset to Excel Pin
uspatel23-Sep-11 2:47
professionaluspatel23-Sep-11 2:47 
GeneralRe: Export dataset to Excel Pin
countmein23-Sep-11 4:01
countmein23-Sep-11 4:01 
QuestionASP.NET MVC3 Pin
eddieangel22-Sep-11 11:03
eddieangel22-Sep-11 11:03 
I am having an issue understanding how to send data back from my view to my controller. I want to filter the results of a query based on search criteria. So the view looks something like this:

@model IEnumerable<CloutWeb.Models.Observation>

<h2>@ViewBag.Title</h2>
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Claim
        </th>
        <th>
            Location
        </th>
        <th>
            Category
        </th>
        <th>
            Defect
        </th>
@foreach (var item in Model.Observations) {
    var imageName = Path.Combine("/Content/", item.fileName);
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Claim.description)
        </td>
        <td>
            @Html.ActionLink(item.Location.name, "Search", new { id = item.locationId, searchType = 1 })
        </td>
        <td>
            @Html.ActionLink(item.Defect.Category.name, "Search", new { id = item.Defect.categoryId, searchType = 2 })
        </td>
        <td>
            @Html.ActionLink(item.Defect.name, "Search", new { id = item.defectId, searchType = 3 })
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.id }) |
            @Html.ActionLink("Details", "Details", new { id=item.id }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.id })
        </td>
    </tr>
}

</table>


My issue is that I want 4 dropdown lists at the top that can be used to filter the information below. Any help would be appreciated. I have read that a viewmodel should be used here, but I can't find a good example relevant to what I need. Neither the Music Store app or the Nerd Diner app has this particular kind of functionality. I read tons of posts on Stackoverflow, but was unable to gleen an answer. Also, not sure of the difference between html.dropdownlist and html.dropdownlistfor, if anyone could point me in the right direction I would be much obliged.

Cheers, --EA
QuestionC#.asp.net 2010 development plan Pin
Member 821751722-Sep-11 6:03
Member 821751722-Sep-11 6:03 
QuestionWant a solution for this problem Pin
Dinesh Denny22-Sep-11 3:01
Dinesh Denny22-Sep-11 3:01 
AnswerRe: Want a solution for this problem Pin
m@dhu22-Sep-11 3:48
m@dhu22-Sep-11 3:48 
AnswerRe: Want a solution for this problem Pin
Shah Rizal22-Sep-11 16:20
Shah Rizal22-Sep-11 16:20 
QuestionGet frame on another page Pin
Mugdha_Aditya22-Sep-11 2:51
Mugdha_Aditya22-Sep-11 2:51 
QuestionNeed to access physical file in iSeries by using asp.net Pin
Member 322226421-Sep-11 15:02
Member 322226421-Sep-11 15:02 
QuestionQuestion on entity class in the layer Pin
DotNetXenon21-Sep-11 9:07
DotNetXenon21-Sep-11 9:07 
AnswerRe: Question on entity class in the layer Pin
Pravin Patil, Mumbai21-Sep-11 18:53
Pravin Patil, Mumbai21-Sep-11 18:53 
GeneralRe: Question on entity class in the layer Pin
DotNetXenon22-Sep-11 5:52
DotNetXenon22-Sep-11 5:52 
GeneralRe: Question on entity class in the layer Pin
Pravin Patil, Mumbai23-Sep-11 7:10
Pravin Patil, Mumbai23-Sep-11 7:10 
GeneralRe: Question on entity class in the layer Pin
DotNetXenon23-Sep-11 8:04
DotNetXenon23-Sep-11 8:04 
GeneralRe: Question on entity class in the layer Pin
Pravin Patil, Mumbai23-Sep-11 19:36
Pravin Patil, Mumbai23-Sep-11 19:36 
Questioncreate user Pin
kunal Singh Rajput20-Sep-11 19:44
kunal Singh Rajput20-Sep-11 19:44 
AnswerRe: create user Pin
Blue_Boy20-Sep-11 21:15
Blue_Boy20-Sep-11 21:15 
AnswerRe: create user Pin
uspatel21-Sep-11 2:09
professionaluspatel21-Sep-11 2:09 
AnswerRe: create user Pin
Dalek Dave21-Sep-11 22:38
professionalDalek Dave21-Sep-11 22:38 
Question2010 C# asp.net designer Pin
classy_dog20-Sep-11 3:39
classy_dog20-Sep-11 3:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.