html-helper


Getting Class Property Values from Linq Expression In Html Helper MVC3


I have an HTML helper that I need to pass an Object to. This Object is a class that has some Properties on it that I would need to access in the helper. The actual base class of this object is a generic type so I decided that I would use a Linq expression and pass it the object.
Here is the method signature:
public static MvcHtmlString PartyDetailsField<TModel, TProperty>(this HtmlHelper<TModel> helper, string controlLabelText, Expression<Func<TModel, TProperty>> expression, IEnumerable<IDetailsConfiguration> configuation, string width = "")
Here is how I use the control:
#Html.PartyDetailsField("Identifiers", m => m.Person, Model.IdentifierConfiguration, "186px")
I need the instance information from m.Person. How can I get the object instance and access the properties of the class instance from the expression? Is there a better way of doing this?
suggest reading this post http://blogs.msdn.com/b/csharpfaq/archive/2010/03/11/how-can-i-get-objects-and-property-values-from-expression-trees.aspx

Related Links

Converting C# Razor view syntax for checkboxlist into VB.Net
Table of content is not proper in chm file
Web helpers for MVC 5?
asp.net mvc3 or mvc4 html helper is not working
Configure the Javascript function + Html Helper
Displaying multiple values with Telerik ASP.Net MVC extensions with the ForeignKey column
Custom html helpers in MVC 4
Return multiple checkbox from Custom html helper in mvc 3r
Getting Class Property Values from Linq Expression In Html Helper MVC3
format htmlhelper date field to dd/mm/yyyyy
How to create internal Linking inside CHM help file
simple_html_dom timer?
Printing Html with razor view engine
How to set the default page for a .CHM file in HTML Help Workshop?
How can I use an HTML page as an email that reads as such in mail servers exactly as seen on the web?
Easiest way to open chm files programmatically?

Categories

HOME
java
kde
json.net
session
dot
mean-stack
gitpitch
primary-key
maude-system
wheelnav.js
u-sql
zend-framework3
zebra-printers
decomposition
quartz-scheduler
netflix
seaborn
apache-metamodel
database-replication
swiftlint
facebook-instant-articles
css-animations
kudan
spark-jobserver
brunch
info.plist
librato
preg-match
media-queries
twilio-api
siesta-swift
vsts-build-task
repo
azure-sql-database
rotational-matrices
restlet
adobe-premiere
dynamics-crm-2013
service-discovery
az-application-insights
user-controls
preconditions
hp-ux
keydown
btrace
logfiles
outlook-2013
jquery-validate
logparser
veracode
tizen-native-app
idisposable
git-diff
recursive-datastructures
setter
tactic
kbuild
mcafee
lync-client-sdk
django-scheduler
webdriverjs
topbeat
medium.com
wdf
static-ip-address
url-masking
intrusion-detection
mongocsharpdriver
gstreamer-0.10
pagedlist
testng-dataprovider
make-install
php-parse-error
unity-networking
metaclass
comobject
qdialog
arcanist
inmobi
nstableviewcell
google-style-guide
cdt
aapt
uitouch
undefined-reference
didselectrowatindexpath
openlaszlo
gnu-smalltalk
quartz-graphics
dataadapter
jquery-mobile-dialog
spring-validator
distutils
rdoc
funscript
labwindows
uiviewanimation-curve
enter
assembly-loading
nsobject
pydot
spyware
coredump
locationlistener
google-friend-connect
web-application-design
dmx512
wise
gin
meego
firefox4
javap
simpletest
port-number
spec#
msdev

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App