Hi,
does this happen when accidentally clicking enter when focus is in the field
(it is textboxt?)? Note that you should also check Page.IsValid property in
code at the server-side before letting critical code to run. But, if the
problem is that you wouldn't have client script files correctly set up in
the site root, please check it too.
Here is a good article about ASp.NEt validation generally:
http://msdn.microsoft.com/library/de...pplusvalid.asp
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
http://blogs.aspadvice.com/joteke
"Rafia" <> wrote in message
news:...
> Hi all
> I have put a required validation control on one of my aspx pages. I also
> have a server button on the page which the user will click to submit the
> data. The problem is when the user do not enter anything on the required
> field, it show the error then immediately submits the form and the code in
> my server control event handler starts to execute.
>
> Any help will be appreciated
>
>