I have an ASP.NET site that I am trying to access div elements by their ID from the C# code behind file. Essentially I want to see if a div element exists, and if so, alter its
If you add runat=server please add it at last of the div:
runat=server
This will work
However, this will not By doing that, you can modify any property from codebehind as: divBtn.Style["display"] = "none"; This works even with masterpages. The div is not included in a masterpage. 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
However, this will not
By doing that, you can modify any property from codebehind as: divBtn.Style["display"] = "none"; This works even with masterpages. The div is not included in a masterpage. 0 讨论(0) 查看其它4个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
By doing that, you can modify any property from codebehind as:
divBtn.Style["display"] = "none";
This works even with masterpages. The div is not included in a masterpage.