473,326 Members | 2,805 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,326 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 1539

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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.