本文介绍了没有显示错误消息,为什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

谢谢大家,我的代码现在可以正常工作,因为我添加了一个空方法,该方法受保护为void CheckBoxList1_SelectedIndexChanged(对象发送者,EventArgs e.现在,我的代码能够显示Web上的复选框列表,但如果没有显示此复选框,选择了不显示错误消息的原因,为什么?还是visversa?

Thanks guys, my code now is working after I added the empty method which is protected void CheckBoxList1_SelectedIndexChanged (object sender, EventArgs e. Now my code is able to show the check box list in the web but if one is not selected its not showing the error message, why? or visversa?

        {
        }
public bool isCheckboxSelected()
        {
            for (int i = 0; i < CheckBoxList1.Items.Count; i++)
            {
                if (!CheckBoxList1.Items[i].Selected)
                {
                    return false;
                }
            }
            return true;
        }
        protected void Button1_Click(object sender, EventArgs e)
        {


                if (isCheckboxSelected())
                {
                    string.Format(" completion is successful");
                }
                else
                {
                    string.Format(" completion is not successful please select each check box");
                }

        }
        protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
        {
        }

推荐答案


这篇关于没有显示错误消息,为什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 12:38