I have a Page_Load event in my ASP.NET C# website which has a lot of testing for different conditions. If 1 of the conditions isn't met, I want stop executing the rest of the code. I've done this with 'return', but now I have the problem of having a foreach loop where I'm again testing a load of conditions, and on any condition not being met, I need to go to the need element in the loop rather than going through all the other conditions. I've thought of setting a boolean to avoid the rest of the code being executed, but I'd like to know if there is an easy way to just automatically go to the next element.
lfc77