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

java - How to pass parameters between Request-Scoped Controllers? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -