"Faizan Ahmed" <> wrote in message
news:%...
> Thanks for replying,
> I've tried to add the button in the same way as the toolbar and initially
> it
> did'nt work, It raised some error with the control tree and view state. I
> then turned my custom control's EnableViewState property to false and then
> it worked, i.e. now a normal button is raising events in my control.
> Still i think this is not the problem with the Toolbar. Any ways... can
> you
> suggest any thing if i insist on using this toolbar?... and what other
> options i have if i leave this toolbar, are there any other free source
> toolbar controls you know off? and one more question .. y i had to turn
> the
> EnableViewState property to false, to get the event of the button's
> click??
I don't know why EnableViewState should have affected anything, unless
you're adding the Button dynamically but not adding it on the initial
request and each postback.
In the absence of the Microsoft toolbar, you could write one of your own. My
favorite controls book ("Developing Microsoft® ASP.NET Server Controls and
Components" from Microsoft Press, by Nikhil Kothari and Vandana Datye
(
http://www.microsoft.com/mspress/books/5728.asp)) has an example of a
ButtonBar control. I have used this as the starting point for my own
"toolbar-style" controls.
John Saunders