Sunday, December 20, 2009

Difference between ASPX Controls Visible and ClientVisible

.Visible:

The Visible property indicates whether a server control is rendered as an UI on the page. If this property is set to False, the control isn't rendered, and you can't operate it on the client side.

.ClientVisible:

The ClientVisible property specifies the initial visibility state of a web control on the client side. If this property is set to false, the control is rendered on a web page, but it is initially hidden on the client side.

Happy Programming!!!

Set NullText property for AspxTextBox and AspxDropDownEdit Editor controls

Editor's NullText property can be used to display a prompt in the editor's edit box. The specified text is displayed if the editor's value is null and the editor is not focused. The prompt text disappears when the editor receives focus.

Code:

ASPXTextBox txt = new ASPXTextBox();
txt.ID = "TextBox1";
txt.ClientInstanceName= "TextBox1";
txt.NullText ="Enter User Name!!";

Happy Progrmming!!!