How to manipulate data in View using Asp.Net Mvc RC 2?

Posted by Picflight on Stack Overflow See other posts from Stack Overflow or by Picflight
Published on 2010-03-19T17:49:56Z Indexed on 2010/03/24 20:53 UTC
Read the original article Hit count: 307

I have a table [Users] with the following columns:
INT SmallDateTime Bit Bit
[UserId], [BirthDate], [Gender], [Active]

Gender and Active are Bit that hold either 0 or 1.

I am displaying this data in a table on my View.

  1. For the Gender I want to display 'Male' or 'Female', how and where do I manipulate the 1's and 0's? Is it done in the repository where I fetch the data or in the View?

  2. For the Active column I want to show a checkBox that will AutoPostBack on selection change and update the Active filed in the Database. How is this done without Ajax or jQuery?

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about data-structures