Clearly your are using Windows Forms. So in this context there is no
Response
object, which you can only find in
web applications.
So you have several choices :
1- Create a web application instead of a Windows Forms one
2- Create a console application and use
Console.Write("Whatever text you want to present to the user");
3- Keep your Windows Forms Application and use a control (for example, a
TextBox
) to present text messages to the user.
You can also use the
Debug
object, but in this case message will not be presented on the application itself but in the debug console of your IDE.
But the main useful advise would be: please learn to study the objects you are using. Here it seems you have copied/pasted some codes obtained from several sources without understanding what is behind them in the first place.
You should study the differences between a Windows Forms Application and an ASP.NET Web Application.
Some useful links:
Choosing Between Windows Forms and Web Forms[
^]
ASP.NET Verses Winforms[
^]
These are just the most obvious links; you can find many others using your favorite search engine.
Good luck, learning development takes some time, don't be afraid to read, and read, and then read some more.