asp.net - C# Multiple SelectionChanged Events -



asp.net - C# Multiple SelectionChanged Events -

i want have 2 selectionchanged events, this

protected override void xpathlist_selectionchanged(object sender, selectionchangedeventargs e) { //my code } private void xpathlist_selectionchanged(object sender, selectionchangedeventsargs e) { //my code }

it gives next error: type 'testapp.mainpage' defines fellow member called 'xpathlist_selectionchanged' same parameter type. how can solve this?

you can't create identical method same signature. if want handle 1 event 1 command 2 different methods, must utilize such code:

page_init() { //initialization code xpathlist.onselectionchanged += xpathlist_selectionchanged1; xpathlist.onselectionchanged += xpathlist_selectionchanged2; } protected void xpathlist_selectionchanged(object sender, selectionchangedeventargs e) { //my code } protected void xpathlist_selectionchanged2(object sender, selectionchangedeventsargs e) { //my code }

and remove event handler declaration markup.

how to: create event handlers in asp.net web pages

c# asp.net events selectionchanged

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -