1. When a user enter's a value in a text field on a web form, I want to
display everything in capital. How canI do so?
2. I have a form with two command buttons (Submit). The first one is to
search and retrieve data in to one of the drop downs on a form. The second
one is for Adding a new record to database. But the problem is when I
click on the first button, it validates the text fields under the second
button group. What can I do it limit validation to only certain fields on a
postback/submit.?
Thanks in Advance
BVR
If you want this to happen immediately, you need to write a client-side
onKeyPress event for the textbox element in question. You would use the
String object's toUpper() method. If you want to do this in .NET, you need
to wait until the user submits the data and in the page's postback event
handler use: Textbox.Text = Textbox.Text.ToUpper().
Instead of using RequiredFieldValidator controls for the Add Record fields,
use CustomValidator controls. In the Click event handler for the Add Record
button, set a Boolean flag to True. In your custom validator code, do your
validation for non-null values only if the Boolean flag is True.
> 1. When a user enter's a value in a text field on a web form, I want to
> display everything in capital. How canI do so?
[quoted text clipped - 10 lines]
> Thanks in Advance
> BVR