Dear Stackoverflowers,
I am trying to build a simple web application in ASP.NET where I have a textbox and a button and when the button is pressed I should count the number of UPPERCASE-characters. I was thinking of trying to use a RegularExpression but i dont know how to separate it.
Now i have a .cs file that looks like this:
public static class TextAnalyzer
{
public static int GetNumberOfCapitals(string text)
{
}
}
And a aspx.cs file that looks like this and is connected to my button.
protected void Button1_Click(object sender, EventArgs e)
{
// Regex caps = new Regex("");
}
Where do i put the regular expression? in aspx.cs or .cs? And at the samt time you can give me some other tips, im an absolute beginner and this is my first web page! Thanks in advance.
Your code in the button-click event could look like this:
The code in the event could be like this: