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里输入内容,点击按钮,提示还在,
应该怎么处理,谢谢!

解决方案 »

  1.   

    你第一个判断以后没下一步操作的啊? 
    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); 
                } 
            } 
      

  2.   

    不行,第一次提示,第二次正确输入,提交后,lable.text内容还在,也就是一直都在了,
    怎么将lable.text重新为空呢
      

  3.   

    你是B/S的吗?
    那你要证验输入的话就用验证控件
    http://zhidao.baidu.com/question/25603123.html