多视图在页面中不起作用 [英] multiview doesn't work in page
本文介绍了多视图在页面中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨.
我已经在Asp.net中设计了一个Formpage,在HTML代码中我应用了一个多视图,并在其中放置了一个视图,我还在PageLoad中添加了以下代码:
Hi.
i have designed a formpage within Asp.net ,in Html code i have applied a multiview and inside that a view is placed ,i also have wtitten the following code in PageLoad:
if(!ispostback)
{
multiview1.visible=false;
if(CheckBox1.checked)
{
multivew1.ActiveViewIndex=-1;
multiview1.visible=true;
}
}
但是,当我开始调试代码时,尽管我选中了复选框,但multivew内部的所有页面都看不到.这是怎么回事?
but when i start to debugg the code , all the page which is inside the multivew won''t be visible , despite i chcek the checkbox nothing happens.what''s wrong with that?
推荐答案
您的if
逻辑位于IsPostback
中,这总是导致可见的错误.
修改为:
Your logic ofif
lies inIsPostback
that leads to visible false always.
Modify it to:
if(!ispostback)
{
multiview1.visible=false;
}
else if(CheckBox1.checked)
{
multivew1.ActiveViewIndex=-1;
multiview1.visible=true;
}
这篇关于多视图在页面中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文