开发者

ASP.Net textbox will not postback on textchanged if set to false on pageload

I have a textbox with a regex validator attached to it and some stuff in the ontextchanged code behind. This all works fi开发者_如何转开发ne unless I start the textbox out with Visible=false. Obviously, I'm setting the textbox.Visible to true later on in the codebehind, but when I do this, no postback occurs when the text changes. I'm pretty sure I have isolated the cause to when I change the visible property, but has anyone seen anything like this or know some sort of work around?


When you set a control's visible property to false it is not rendered on the page at all. If you simply want it to not display to the user you can use CSS.

Do you have AutoPostBack="true" set on the textbox?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜