c# - How can I render databound values inside of a custom control? -


i'm placing custom control inside of existing repeater template.

<itemtemplate>   <custom:mycontrol>     <something>       <%# eval("firstname") %>     </something>   </custom:mycontrol> </itemtemplate> 

is there way can somehow value of <%# eval("firstname") %> without adding property custom control?

<custom:mycontrol firstname='<%# eval("firstname") %>' /> 

i have bigger need, in want define entire html structured inner property inside of <something> , disaster inside of property.

so, repeater databound, , apparently control i'm placing within not databound, yet values can passed through via property tags...

i found answer stating wasn't possible, it's 5 year old question. eval inside asp.net repeater doesn't work inside control

grasping @ straws, hoping solution.

you have create templated user control properties having templatecontainer attribute. see following article example.

creating templated user control


Comments

Popular posts from this blog

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -