So basically I need a if(!IsPostBack) check in my windows form c# application because after grabbing a value from a textbox once it is no longer grabbing that value and instead giving null. However I am getting the error. The error:
The name IsPostBack does not exist in the current context
I have:
using System.Web.UI;
So i'm not sure why this is happening. Any insight or solutions would be greatly appreciated, thanks.
Here is my code:
if(!IsPostBack)
System.Console.WriteLine("Text: " + textBox2.Text);
MakeSureFieldIsFilledIn errormessagefieldempty = new MakeSureFieldIsFilledIn();
errormessagefieldempty.ShowDialog();
}