I've created a web form which contains different checkbox lists, then I created a submit button. How can I write an event handler in the button so that it shows a different result for different options? For example: if the user checked "apple" and "banana" from checkboxList1 and "Lettuce" from checkboxList3 then pressed the button, the result would appear in a new page, let's say: result= vegetarian.
PS: I'm using ASP.NET in Visual Studio 2008
I tried to look it up on Youtube but I didn't find anything
So, say this markup:
And then the code for this button:
And on the next page we navigate to we have this markup:
And code for that 2nd page to show the food group type:
So, the result is this:
So, to create the "event" for the button? You can type in the markup, or just double click on the button, do so should jump you to code behind for the given button, and thus a event will have been created for that one button.