Itay.B
Itay.B

Reputation: 4119

ASP.NET object visibility

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

Upvotes: 2

Views: 328

Answers (1)

David M
David M

Reputation: 72930

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.

Upvotes: 4

Related Questions