Welcome Guest Search | Active Topics | Members | Log In | Register

fieldvalidator Options · View
Vinnie
Posted: Saturday, October 06, 2007 8:15:37 AM


Rank: Guest
Groups: Guest

Joined: 9/17/2007
Posts: 11,670
Points: -1,200
Date parsed: 06/10/2007 08:15:37
Date: Sat, 06 Oct 2007 15:15:37 -0700



vinnie
View profile
More options Oct 6, 6:05 pm
Newsgroups: microsoft.public.dotnet.languages.csharp
From: vinnie <centro.ga...@gmail.com>
Date: Sat, 06 Oct 2007 15:05:37 -0700
Local: Sat, Oct 6 2007 6:05 pm
Subject: form with "clear"
Reply | Reply to author | Forward | Print | Individual message | Show
original | Remove | Report this message | Find messages by this author
i have a small form, with 5 labels and 5 textboxes (with 5 field
validators), plus 2 buttons.

Now, one of the buttons is the "CLEAR" one, and so if the user presses
the clear btn all the field should be reset to empty.
I have added the code to the page as it follows:

protected void Button1_Click(object sender, EventArgs e)
{
TextBoxName.Text = "";
TextBoxTelephone.Text = "";
TextBoxTitle.Text = "";
TextBoxMessage.Text = "";
TextBoxemail.Text = "";
}

however, if the user after completing two fields wish to clear all, it
happens that pushing the CLEAR btn the field validators blocks the
action.

What should I add to the code, to make the fieldvalidator to work
only on the send-button (or to not work for the clear-button)?

thanks,
Vinnie

Users browsing this topic
Guest


Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFPro Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.1 (NET v2.0) - 9/10/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.
This page was generated in 0.030 seconds.