I am using ASP.NET.
I am not sure what you will call this but I would like text to be displayed in my text box called txtName. So when the form load the text box will have faded text that will say “Required”. Then when the user click inside the text box i want the user to place a value inside the text box.
Is this possible in ASP.NET? If so, how can this be done????
onClick is a client side event. onFocus may be better. You can use
txtName.Attributes.Add(“onFocus”, “this.value = ”;this.style.color = ‘black’;”)
Put it in the Page’s PreRender event.