Hi friends,
How can we have a button with a dropdownmenu? How can we implement this?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Zoran HorvatPosted Aug 9, 2011, 6:27 AM
Avoid popping up new form from JavaScript or otherwise popup blockers might interfere.
Zoran
B M SuchitraPosted Aug 9, 2011, 6:21 AM
That is how my boss requires.. Bit crazy but have to do it like that or else convice that guy
Zoran HorvatPosted Aug 9, 2011, 5:38 AM
You can create a DIV and populate it with checkboxes, keeping it invisible. From button onClick event you would make it visible. Then make it invisible again when user clicks a checkbox, which is done from onValueChanged event of every checkbox.
Zoran
B M SuchitraPosted Aug 9, 2011, 5:35 AM
I don`t want to open a new window. I want it in the same asp.net page. The button itself should act like a dropdown control when it is clicked
Zoran HorvatPosted Aug 9, 2011, 4:54 AM
That is all you need and code is relatively simple.
Zoran
B M SuchitraPosted Aug 9, 2011, 4:51 AM
Prasant JinagaPosted Aug 9, 2011, 4:45 AM
Can you please ellaborate your question a bit?
Thanks,
Prasant
Zoran HorvatPosted Aug 9, 2011, 4:39 AM
You can always use ComboBox with DropDownStyle set to DropDownList. If you insist on having a proper button then you can show context menu from Click event. There are other possibilities as well - create your own control which would serve a dropdownmenu which you would prefer; then show this control in a splash window from Button.Click event. And so on... possibilities are endless.
Zoran