Click here to Skip to main content
15,891,136 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Development Server vs Production Server Pin
Adam R Harris15-Jun-10 8:45
Adam R Harris15-Jun-10 8:45 
GeneralRe: Development Server vs Production Server Pin
Yusuf15-Jun-10 12:35
Yusuf15-Jun-10 12:35 
GeneralRe: Development Server vs Production Server Pin
Adam R Harris15-Jun-10 13:04
Adam R Harris15-Jun-10 13:04 
GeneralRe: Development Server vs Production Server Pin
pinna_hari15-Jun-10 18:38
pinna_hari15-Jun-10 18:38 
GeneralRe: Development Server vs Production Server Pin
Adam R Harris15-Jun-10 19:32
Adam R Harris15-Jun-10 19:32 
Question'Sys' is undefined Pin
Elena200615-Jun-10 4:19
Elena200615-Jun-10 4:19 
AnswerRe: 'Sys' is undefined Pin
R. Giskard Reventlov15-Jun-10 4:25
R. Giskard Reventlov15-Jun-10 4:25 
QuestionGridView MVC Model Pin
D Hinterlang15-Jun-10 3:32
D Hinterlang15-Jun-10 3:32 
Hi guys, I'm new to MVC and ASP probably like a few days experience.
I've googled, looked through examples but not finding what I need.

I have a service which returns a
IEnumerable<ViewModel>


I consequently pass this Model into the View using
Inherits="System.Web.Mvc.ViewPage<IEnumerable<ViewModel>>"


I have an asp:GridView setup with no datasource.

How would I bind the model that is passed into the View to the GridView?

I'm currently doing it like this but I would really like to have it in a gridview whereby i can sort the information and apply filters since I don't want to access the SQL DB directly from the ASP page and use the service to access it then return the Model like I am.

<ul>
    <% foreach (var vm in ViewModel) { %>
    <li>
        <%= Html.ActionLink("Edit", "Edit", new { id = vm.ClientCode })%>
        <%= Html.Encode(vm.ClientCode)%>
        is the code for
        <%= Html.Encode(vm.ClientName)%>
        <%= Html.Encode(vm.ClientSurname)%>
    </li>
    <% } %>
</ul>

Questioninsert dropdownliste Pin
tek 200915-Jun-10 2:08
tek 200915-Jun-10 2:08 
AnswerRe: insert dropdownliste Pin
saini arun15-Jun-10 3:12
saini arun15-Jun-10 3:12 
AnswerRe: insert dropdownliste Pin
R. Giskard Reventlov15-Jun-10 3:12
R. Giskard Reventlov15-Jun-10 3:12 
GeneralRe: insert dropdownliste Pin
saini arun15-Jun-10 3:29
saini arun15-Jun-10 3:29 
GeneralRe: insert dropdownliste Pin
R. Giskard Reventlov15-Jun-10 4:00
R. Giskard Reventlov15-Jun-10 4:00 
QuestionRe: insert dropdownliste Pin
tek 200915-Jun-10 4:04
tek 200915-Jun-10 4:04 
AnswerRe: insert dropdownliste Pin
R. Giskard Reventlov15-Jun-10 4:24
R. Giskard Reventlov15-Jun-10 4:24 
GeneralRe: insert dropdownliste Pin
tek 200915-Jun-10 4:29
tek 200915-Jun-10 4:29 
GeneralRe: insert dropdownliste Pin
R. Giskard Reventlov15-Jun-10 5:13
R. Giskard Reventlov15-Jun-10 5:13 
AnswerRe: insert dropdownliste Pin
T M Gray15-Jun-10 11:22
T M Gray15-Jun-10 11:22 
GeneralRe: insert dropdownliste Pin
tek 200915-Jun-10 22:07
tek 200915-Jun-10 22:07 
GeneralRe: insert dropdownliste Pin
T M Gray16-Jun-10 6:00
T M Gray16-Jun-10 6:00 
AnswerRe: insert dropdownliste Pin
R. Giskard Reventlov15-Jun-10 22:36
R. Giskard Reventlov15-Jun-10 22:36 
AnswerRe: insert dropdownliste [modified] Pin
tek 200915-Jun-10 22:57
tek 200915-Jun-10 22:57 
Questionparameters passed in LAN connection.. Pin
jainiraj15-Jun-10 1:39
jainiraj15-Jun-10 1:39 
AnswerCross Post Pin
dan!sh 15-Jun-10 2:06
professional dan!sh 15-Jun-10 2:06 
Answercross-post Pin
Luc Pattyn15-Jun-10 2:54
sitebuilderLuc Pattyn15-Jun-10 2:54 

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.