473,396 Members | 1,996 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,396 software developers and data experts.

Attributes.Add onclick CausesValidation

I have a web form that has a few textboxes with
requiredfiledvalidators attached to them. Prior to saving the entries
form the form, I have a msgbox that confirms that the users wants to
save. It works great with one issues. The requiredfieldvalidators
don't get executed until the onclick function is executed. If the user
confirms the error message, the button executes and the form is saved,
then the requiredfieldvalidators show up….
I am assuming that by adding an attribute to "Onclick" the
CauseValidation=false, how do I make it CauseValidation=true.
cmdSave.Attributes.Add("onclick", "return confirm('do you want to
save...?');")
Jul 21 '05 #1
0 1546

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

Similar topics

4
by: rufus | last post by:
I want to add 2 'onclick' events to a link button but, of course, the javascript wont work. In other words: linkbutton.Attributes.Add("onClick", "MyFunction1();")...
3
by: Janaka | last post by:
I've seen and used some samples where you can set the onclick attrubute to a Button control to get it to do some javascript a la : btnUse.Attributes = "DoSomeJS()"; However when i try and get...
4
by: Craig G | last post by:
i was using the following on a serverside button on a form If (Not Page.IsPostBack) Then Me.BtnDelete.Attributes.Add("onclick","return confirm('Are you sure you want to delete?');") End If ...
1
by: darkpeace | last post by:
Okay i'm at my wits end. I've tried every which way to add a simple onClick even to checkbox items in my code behind : example: Protected WithEvents chkSample As...
1
by: David Wier | last post by:
I'm trying to assign the results of a variable in ASP.Net to a button's onclick event (a Javascript function) - - The Javascript function is: function OpenIt(NewWindow) { ...
0
by: anna | last post by:
I have a web form that has a few textboxes with requiredfiledvalidators attached to them. Prior to saving the entries form the form, I have a msgbox that confirms that the users wants to save. ...
1
by: Anup | last post by:
In my form I and doing validations using 'Javascript' as I m using ASP1.1 and there is very less support for Validators there. //Code Behind private void Page_Load(object sender,...
1
by: fabrice | last post by:
Hello, I d like to modify the Onclik Event of an ImageButton control in code behind. But when i do it , i get an error. This is ma code : The control is the pasx page :
8
by: SAL | last post by:
Hello, I have a button on a webform that has an OnClick event defined as such: <asp:Button ID="btnSearchByName" runat="server" Text="Search By Name" OnClick="btnSearchByName_Click" Width="152px"...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.