c# - Type to use to set Attributes in an ASP.NET Control? -


I'm trying to add an attribute in a web page control.

  text box txt = new text box (); Txt.Attributes ["Foo"] = "Bar"  

I have to put it in a method, but my problem is that I do not know what type of element I will send - maybe An input can be select one, in short I need this method below, but what is oControl ? In VB, I used to call it only one object .

  Protected Zero SetAttrib (oControl) {oControl.Attributes ["Foo"] = "Bar"}  

Thanks

I think you want:

  Protected Zero SetAttrib (WebControl oControl) {oControl.Attributes ["Foo"] = "bar"}  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -