expando/dynamic properties in user controls

  • Thread starter Igor Belagorudsky
  • Start date
I

Igor Belagorudsky

hi,

hi im trying to write a user control that is basically a customizable button
that gets drawn as a table in the end and all is well except that i want to
be able to add properties to the table in the end. for example, i handle
width, color and text properties so that if you call:

<mystuff:button runat=server width=10 color=blue text=hi />
all is well and it draws me a
<table width=10 bgcolor=blue><tr><td>hi</td></tr></table>

but i want to be able to add unhandled properties so that they propegate
down to the table so that i can do something like
<mystuff:button runat=server width=10 blah=bleh color=blue text=hi />
it would ouput
<table width=10 bgcolor=blue blah=bleh><tr><td>hi</td></tr></table>

i can't figure out a way to do this.. can anybody help? also i've never done
asp in .net before and the distinction between web controls and user
controls is a bit vague although i read a bunch of stuff about them. does my
problem sound like it should be done using a web control instead? i sort of
want the ability to add it in html like
<mystuff:button ... /> and i dont think you can do that with web controls,
can you?

thanks, igor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,539
Members
45,024
Latest member
ARDU_PROgrammER

Latest Threads

Top