tag:blogger.com,1999:blog-125341290284114978.post6113985533839814890..comments2023-04-23T00:05:10.829-07:00Comments on Guy Ellis' Tech Blog: Which button was clicked in the ASP.NET MVC View?Guy Ellishttp://www.blogger.com/profile/02574435376236977220noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-125341290284114978.post-72309408795836735882010-12-15T15:21:27.000-08:002010-12-15T15:21:27.000-08:00Robert - in that case you would completely remove ...Robert - in that case you would completely remove the causesvalidation attribute instead of setting it to false.guy ellisnoreply@blogger.comtag:blogger.com,1999:blog-125341290284114978.post-310222992019181832010-12-15T12:25:50.000-08:002010-12-15T12:25:50.000-08:00I tried this and it definitely returns the value o...I tried this and it definitely returns the value of the button clicked. However, I am doing client-side validation using and when the Cancel button is clicked it insists on having valid data before posting back, even when I have causesvalidation set to false.<br /><input type="submit" value="Cancel" name="cancel" causesvalidation="false" /><br />That's not of much use for a cancel button, since why would I want valid data on a cancel?Robertnoreply@blogger.comtag:blogger.com,1999:blog-125341290284114978.post-5245580246844116162009-10-14T09:59:57.000-07:002009-10-14T09:59:57.000-07:00This almost works but if I have a textbox with som...This almost works but if I have a textbox with some jQuery validation for some reason it 'loses' the value for the button pressed. It's really annoying!Simonnoreply@blogger.com