所以基本上我需要在我的 windows 窗体 c# 应用程序中进行 if(!IsPostBack) 检查,因为在从文本框中获取一个值后,一旦它不再获取该值而是给出 null。但是我得到了错误。错误:
The name IsPostBack does not exist in the current context
我有:
using System.Web.UI;
所以我不确定为什么会这样。任何见解或解决方案将不胜感激,谢谢。
这是我的代码:
if(!IsPostBack)
System.Console.WriteLine("Text: " + textBox2.Text);
MakeSureFieldIsFilledIn errormessagefieldempty = new MakeSureFieldIsFilledIn();
errormessagefieldempty.ShowDialog();
}