protected void LinkButton_Submit_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(RadioButtonList_Mark.Text))
{ Label_Mark.Text = "请打分"; }
if (string.IsNullOrEmpty(TextArea_ResponseContent.InnerText))
{ Label_Content.Text = "内容不能为空"; }
else
{
ForumData.Forum_Insert(ForumItem);
}
}
第一次text为空时,会出提示,然后在text里输入内容,点击按钮,提示还在,
应该怎么处理,谢谢!
{
if (string.IsNullOrEmpty(RadioButtonList_Mark.Text))
{ Label_Mark.Text = "请打分"; }
if (string.IsNullOrEmpty(TextArea_ResponseContent.InnerText))
{ Label_Content.Text = "内容不能为空"; }
else
{
ForumData.Forum_Insert(ForumItem);
}
}
第一次text为空时,会出提示,然后在text里输入内容,点击按钮,提示还在,
应该怎么处理,谢谢!
protected void LinkButton_Submit_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(RadioButtonList_Mark.Text)||string.IsNullOrEmpty(TextArea_ResponseContent.InnerText))
{
………………;
}
else
{
ForumData.Forum_Insert(ForumItem);
}
}
怎么将lable.text重新为空呢
那你要证验输入的话就用验证控件
http://zhidao.baidu.com/question/25603123.html