Web Form Events

  • Thread starter Thread starter Randy
  • Start date Start date
R

Randy

Hi,

I am fairly new to ASP.Net, I have a client (WinForm) background. I am
running into a issue with some controls. On my web form, I have some drop
down boxes that contain the same data (Color, Weight) but for different
products. I need to store this input into an object so I need to uniquely
identify each drop down box selected value with the product ID and code
(Color, Weight...). So, basically I need two unique values for each
dropdown box and I want to do this at design time. I want to create one
event handler that each dropdown box calls, easier to maintain. Any ideas
how to do this? The only idea I can come up with is to use either the ID
property or CssClass property.

Thanks
 
You can have one handler by binding both controls to a single hander. The
sending control will be found in "sender". You can test the name coming off
with the dropdown's client name and process appropriately. Hope this helps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
 
Back
Top