Defining Regex in C#


This question already has an answer here:


As stated in the comments, nothing good ever comes from using regex on HTML. However, if - and only if - the markup is as simple as in your example, you could probably get away with something like this:

    @"<span class=""author"">(?<author>[^<]+)</span>" 

The authors name could be retrieved from match.Groups["author"].Value

Need Your Help user control event propagation trouble

c# events user-controls

I have a simple user control that contains some buttons that fire events which I want to be handled by the page using the control. I have my code setup as such: mvc - trying to display images pulled from db \

c# sql sql-server