asp.net - building a server control that inherits button and giveing it other click capabilities -


my problem this: want create server control inherits system.web.ui.webcontrols.button gives special capability, mean? want button confiorm button work so:

renders page button of lets cancel after user clicks want catch click event (within server control) , after click makeing button not visible , makeing kind of content placeholder (that render server control) visible. content place holder have 2 buttons inside of it: yes , cancel

i want programmer adds control able register function click event of yes button.

and second cancel confirmation button should make first button appear agian.

(i know how in client side time need server events)

my question this: how catch click event? want handled inside server control itself. programmer adds control wont have worry needs register click event of "yes" button

thank you

since want have multiple controls in server control you'll have inherit compositecontrol class , manually add each control , manage different controls visibility. add event handler, use addhandler keyword.

addhandler yourbutton.click, addressof subthathandlesthebuttonclickevent 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -