手动验证码无法正常工作 [英] Manual Validation Code is not working properly
本文介绍了手动验证码无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好
我有一个DropDownList
用于选择一些表名.我宁愿写这样的if-else
代码,也不愿放置RequiredFieldValidator
Hi to all
I have a DropDownList
for selecting some table names. Rather than placing a RequiredFieldValidator
I preferred to write if-else
code like this
if
{
DropDownList.SelectedIndex==0;
Label1.Visible = true
Label1.Text = " Please Select Correct Table";
}
当我先完美地选择任何表名,然后选择选项"Select Table Name(SelectdIndex==0)
"
时,它工作正常
但是,如果我第一次选择"Select Table Name
"选项,它将无法正常工作.请告诉我您是否知道问题出在哪里.
it is working properly when i first select any table name perfectly and then if i select the option "Select Table Name(SelectdIndex==0)
"
but if i select "Select Table Name
" option first time it''s not working . Please tell me if u know where the problem is lying.
推荐答案
不确定您在做什么,您的if(condition)
在哪里,您可以尝试设置属性 AutoPostBack="true"
.
有关更多查询,请在此处评论!
希望对您有所帮助:)
Not sure what you are doing , where is yourif(condition)
, you can try setting theDropDownList
propertyAutoPostBack="true"
.
for further queries comment here!
hope it helps :)
这篇关于手动验证码无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文