Click here to Skip to main content
15,912,578 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a div that add runat="server" to it


C#
<div id="insert"  runat="server" Visible="False" ">


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;


but i recived erroe msg=
1 The name 'divinsert' does not exist in the current context


how can i add attach my proj


=========
i corect it but
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?)
Posted
Updated 12-Jun-15 21:05pm
v4

1 solution

Um... The ID is "insert", not "divinsert"

So I would suggest changing the name in your button code?
 
Share this answer
 
Comments
azeran 13-Jun-15 3:40am    
thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900