开发者

ASP.NET object visibility

开发者 https://www.devze.com 2022-12-31 04:52 出处:网络
I have a webform with a button and a textbox. I want to set the textbox, in design time to Visible = false, and then 开发者_运维百科in the onclick event of the button

I have a webform with a button and a textbox. I want to set the textbox, in design time to Visible = false, and then 开发者_运维百科in the onclick event of the button in the client side using javascript, I want to set the visibility of the button back to true. The problem is that I get a message saying that the object does not exist.

Any idea how to solve this?

TY


Server-side visibility prevents the control rendering to the browser altogether. Rather than hiding the textbox using Visible="false", hide it using CSS - visibility:hidden.

0

精彩评论

暂无评论...
验证码 换一张
取 消