问题描述
我有一个div,它将runat =server添加到它
i have a div that add runat="server" to it
<div id="divinsert" runat="server" Visible="False" ">
起初==> div可见假
按下按钮后会显示
divinsert.visible = true;
然后在div
i有一个用这个代码关闭div的按钮
divinsert.visible = false;
如何添加附加我的proj
=============================
出现此错误:
System.Web.UI.HtmlControls.HtmlGenericControl'不包含'visible'的定义,也没有扩展方法'visible'接受第一个可以找到类型'System.Web.UI.HtmlControls.HtmlGenericControl'的参数(你是否缺少using指令或程序集引用?)
at first ==>div Visible is "False"
after press a button it will be show
divinsert.visible = true;
then on div
i has a button to close div with this code
divinsert.visible = false;
how can i add attach my proj
=============================
this error was appear:
System.Web.UI.HtmlControls.HtmlGenericControl' does not contain a definition for 'visible' and no extension method 'visible' accepting a first argument of type 'System.Web.UI.HtmlControls.HtmlGenericControl' could be found (are you missing a using directive or an assembly reference?)
推荐答案
divinsert.Visible = true;
这篇关于'visible'的定义,没有扩展方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!