User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 422,639 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,721 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting

.net validation/javascript conflict

Join Date: Sep 2004
Posts: 1
Reputation: Hardcoder is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Hardcoder Hardcoder is offline Offline
Newbie Poster

Re: .net validation/javascript conflict

  #7  
Sep 15th, 2004
I came across this problem too.

This simple solution is probably enough:
- disable validation on your delete button (causesvalidation="false")
- add the 'onclick' event as normal using the Attributes property in your code behind file.

Setting causesvalidation to false means .net won't put in it's own 'onclick' method.

For my application, the delete doesn't require any validation (it just deletes the current item), and I think this will apply in the majority of situations. Hopefully those where some form of validation is required, maybe it's simple enough to write custom jscript.

I think it's a bit of a short-fall in the current webforms implementation.

Troy.
Reply With Quote  
All times are GMT -4. The time now is 3:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC