Monday, March 26, 2012

Web Controls Question

Hi,

Is there an equivelent in ASP.Net WebForm controls property to WinForm
controls tag property? I need to hold a value for each control and it
cannot be in the id.

ThanksYou can always add your own attribute:

MyControl.Attributes["myAttribute"]="stringValue";

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]

"Hunter" <hunter@.noguns.comwrote in message
news:%23My1hPZ8GHA.4996@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

Hi,
>
Is there an equivelent in ASP.Net WebForm controls property to WinForm
controls tag property? I need to hold a value for each control and it
cannot be in the id.
>
Thanks
>


Thanks for the reply. I need to do this at design time instead of runtime
so can I add it manually in the source? I get a warning however it works.
I know I can add it to the page load event but rather not.

Thanks

"Eliyahu Goldin" <REMOVEALLCAPITALSeEgGoldDinN@.mMvVpPsS.orgwrote in
message news:urv7koc8GHA.3396@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

You can always add your own attribute:
>
MyControl.Attributes["myAttribute"]="stringValue";
>
--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
>
>
"Hunter" <hunter@.noguns.comwrote in message
news:%23My1hPZ8GHA.4996@.TK2MSFTNGP03.phx.gbl...

Quote:

Originally Posted by

>Hi,
>>
>Is there an equivelent in ASP.Net WebForm controls property to WinForm
>controls tag property? I need to hold a value for each control and it
>cannot be in the id.
>>
>Thanks
>>


>
>

0 comments:

Post a Comment