WebUser Control Usage!

  • Thread starter Thread starter Vai2000
  • Start date Start date
V

Vai2000

Hi All, I have a scenario in which I have created a web user control with 3
linkbuttons on it. Now I am using that control in a webform. The thing is I
want to display certain regions in my webpage depending upon the linkbutton
which was clicked.
Q. How do I identify which linkbutton from the web user control was clicked
on my webform?


TIA
 
The easiest and recommended way is to handle the events that will get fired
to the linkbutton.

If you need to find out which control was the event target you can use
Request.Form["__eventTarget"] to retrieve that information.

+++ Rick ---

--

Rick Strahl
West Wind Technologies
www.west-wind.com
www.west-wind.com/weblog
 
Define correspondent events for your control. Fire them when your buttons
are clicked. You page subscribes (listens) to those events and do whatever
it is when it gets event notification. You can also create a class based on
EventArgs class, define any kind of properties your main page might need
from you control and pass an instance of that class as a parameter to the
event. Easy.

Hope it helps.
Kikoz
 
Back
Top