Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Use of Default button control

Status
Not open for further replies.

Zarcom

Programmer
May 7, 2002
1,275
CA
Hey guys a couple days ago Link9 posted in our Tidbits thread about a new control that allowed the enter button from different parts of the page to activate different events.

Well I went and downloaded the control but I have no idea how to make it work. Most likely my brain has once again shut down with out telling me but I would appreciate a kick in the right direction.

The link for the control is:
Thanks That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Zarc -

I too was looking at the default buttons. The young man behind this code, Andy Smith (who gives as his title "Chief Code Monkey") is only 24, and what an impressive fella he is. He sent this back in an email when I asked him about the default button routine:

"...You can implement the IExtenderProvider so other components on the form can be extended. The Windows Forms ToolTip does this, tho my DefaultButtons is the first one I've ever seen for Web Forms.

There's a great explanation for it on the "Extender Provider Objects" page in the "Visual Basic and Visual C# Concepts" section of the visual studio.net help. Do a search for "Extender Provider Objects" with no filter
and you should be able to find it. That and the two "see also" pages are where I figured it out, tho if I remember correctly, there is actually either a bug in the documentation or in the implementation of
IExtenderProvider where one of the attributes is actually wrong.

The documentation says that one of the attributes should be the Type to be extended, but it's really the Type of the property, or something. I really forget. I probably should have made a comment to that effect in the code for DefaultButtons... The only way I figured it out was by examining the MSIL for the Windows Forms ToolTip to see how the heck MS did it.

As far as translating it to VB... The docs have all their examples in both c# and vb, tho watch out for the fore-mentioned bug..."

Andy also recommended the following text:

Nikhil Kothari's book on MSPress, Developing Asp.net Server Control and Components.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top