Where do I find the list of attributes that I can add to a certain type of control...Specifically, I want to add an attribute to a listbox when an item has been selected...
i think pretty much, when you are adding attributes, you are adding standard html attributes for how that control renders in html, for example, ifyou have a textbox, its renders as <input type=text>, so whatever html attributes apply to that, ie, onchange,onclick, etc, are what you can use.
You've got it exactly gagz. Though Javascript and other client side scripts also work. Any attribute that you can add to a regular html tag you can add to the server control's attribute property
That'l do donkey, that'l do
Mark
If you are unsure of forum etiquette check here faq796-2540
And just in case you meant the server side events (which are called events, not attributes...hence you may/may not have been intending this...anyway...)
In visual studio .net, go to the code view. There will be two drop down lists: one containing a list of controls on that page. When you select it, the drop list next to it will repopulate with all the events associated with that control (i.e. indexchanged, click, etc.).
Keep in mind that if you want your list box to execute server side events, you need to set its autopostback property to true.
D
just to note that only works in VB.NET. In C# you click the events button at the top of the properies window(looks like a lightning bolt). This will give you all the events that that paticular control can handle.
That'l do donkey, that'l do
Mark
If you are unsure of forum etiquette check here faq796-2540
I am using javascript and I want to add an attribute to a list box...when it is "onselection" or something like that but I am unaware of what the attribute would be...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.