473,414 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

problem with button ASPX (running javascript) since I have added a control validator.

Hi,

J'ai un bouton ASPX qui doit déclencher un script java.
I have an ASPX button running a javascript.

To do this, I have added in the codebehind :
this.Btn_Debut.Attributes.Add("onclick","javascrip t:DatePicker('Selection_Ar
chives','Date_Debut')");

So far, no problem with this...

Then, I have added some controls validator. Then the button stop to works.
If I remove the validator, everythings run ok.

Can you help me ?

H. MAILLARD
Nov 17 '05 #1
2 3335
This is because the validator is adding it's own onClick attribute and
overriding your one. You can turn the off the client-side validation by
setting the EnableClientScript property to False.
"Herve MAILLARD" <rv********@free.fr> wrote in message
news:3f***********************@news.free.fr...
Hi,

J'ai un bouton ASPX qui doit déclencher un script java.
I have an ASPX button running a javascript.

To do this, I have added in the codebehind :
this.Btn_Debut.Attributes.Add("onclick","javascrip t:DatePicker('Selection_Ar chives','Date_Debut')");

So far, no problem with this...

Then, I have added some controls validator. Then the button stop to works.
If I remove the validator, everythings run ok.

Can you help me ?

H. MAILLARD


Nov 17 '05 #2
You might want to look at the following articles:

User Input Validation in ASP.NET (ASP.NET Technical Articles)
Review the validation framework in ASP.NET and walk through an example of
adding validation to a page. (11 printed pages)
http://msdn.microsoft.com/library/en..._userinput.asp

ASP.NET Validation in Depth (ASP.NET Technical Articles)
View a detailed examination of the workings of ASP.NET validation Web
controls. (15 printed pages)
http://msdn.microsoft.com/library/en...pplusvalid.asp

--
John Saunders
Internet Engineer
jo***********@surfcontrol.com
"Herve MAILLARD" <rv********@free.fr> wrote in message
news:3f***********************@news.free.fr...
Hi,

I have set all the controls validator EnableClientScript property to False. but it's still not running.

So strange...
H. MAILLARD

"Herve MAILLARD" <rv********@free.fr> a écrit dans le message de news:
3f***********************@news.free.fr...
Hi,

J'ai un bouton ASPX qui doit déclencher un script java.
I have an ASPX button running a javascript.

To do this, I have added in the codebehind :

this.Btn_Debut.Attributes.Add("onclick","javascrip t:DatePicker('Selection_Ar
chives','Date_Debut')");

So far, no problem with this...

Then, I have added some controls validator. Then the button stop to works. If I remove the validator, everythings run ok.

Can you help me ?

H. MAILLARD


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I...
6
by: Shamin | last post by:
Hi, Thanks in advance for answering to my Question. I'm stuck with this problem and would really appreciate any help. I have 2 aspx files (Main.aspx and ReportViewer.aspx). Main.aspx has a...
4
by: Alphonse Giambrone | last post by:
I have a simple login page that has two text boxes, two requiredfieldvalidators, a couple of labels and a button. It has been reduced down to almost nothing to troubleshoot the below problem. ...
2
by: Niclas Lindblom | last post by:
Hi, I have a datagrid with linkbuttons. I would like to catch the click event when a link button has been clicked and use the string from the text value of the link button in a clientside Java...
2
by: Wysiwyg | last post by:
I'm going back to a previous asp.net (C#) web project after a few months of inactivity and my first form, the login, won't submit. I ran with the debugger and still can't see how to resolve this. I...
2
by: B. Chernick | last post by:
I have an odd problem with validation and I'm not sure if the problem's in ASP, VB, Javascript, or a third-party component. We created a user control (ASP1.1) that encapsulates a third party...
4
by: Alan Silver | last post by:
Hello, If you add (say) two text boxes to a form, then add a validator with some simple rule for one of them, you can observer the following problem:- Type some erroneous value in the text...
9
by: Neo Geshel | last post by:
I have strip-mined, strip-searched, and completely exhausted the Internet (up to the 30th page on Google, with 100 results per page!!), all without finding an answer to my question AS TO WHY IT...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.