title: Put the knife down and take a green herb, dude. |
descrip: One feller's views on the state of everyday computer science & its application (and now, OTHER STUFF) who isn't rich enough to shell out for www.myfreakinfirst-andlast-name.com Using 89% of the same design the blog had in 2001. |
FOR ENTERTAINMENT PURPOSES ONLY!!!
Back-up your data and, when you bike, always wear white. As an Amazon Associate, I earn from qualifying purchases. Affiliate links in green. |
|
Wednesday, November 23, 2011 | |
I've got a web app that has a few buttons that I think are better handled purely within the browser, with no asp.net codebehind blind. So one is a "Save" button that includes... onclick="if (Page_ClientValidate()) document.forms[0].submit();" Now I wrote that, but wondered what the heck Page_ClientValidate was as I looked back. There was no other Page_ClientValidate in the project or even the entire solution. Argh. It was pretty obviously running some Microsoft validation code, and I'm currently using plain jane ASP.NET validators on this page. So I figured MS had hidden the function on me somewhere Sure enough. Here's what I suspect is the javascript file include with the function. 1 <script src="/WebResource.axd?d=RqZmHVG6Bo97ETCETCETC&t=634245046914809245" And sure enough, in that page we find the function in question. 1 function Page_ClientValidate(validationGroup) { I don't know why I don't like the setup. I mean, ASP.NET either has to throw this stuff into your page, and there's already plenty of wacky javascript in there, or slap it into an include. They chose the second, and I'm often a little upset when they do the former. Go figure. I mean, heck, they even use human-readable var names to make it easy for you to figure out what they're doing. Just like any other lib (I'm looking at you, jQuery), there's going to be stuff you didn't write, you know? I guess I just don't like all the overhead and the way their whitespace and code includes completely break with the way I do it. When I use jQuery, there are some includes and a few lines of code in a specialized format. I can still manage the way the code feels when you run through the logic and whitespace. With this auto-generated stuff, I can't as easily. I don't know. Anyhow, that's where Page_ClientValidate is. Labels: asp.net posted by ruffin at 11/23/2011 02:28:00 PM |
|
| |
MarkUpDown is the best Markdown editor for professionals on Windows 10. It includes two-pane live preview, in-app uploads to imgur for image hosting, and MultiMarkdown table support. Features you won't find anywhere else include...
You've wasted more than $15 of your time looking for a great Markdown editor. Stop looking. MarkUpDown is the app you're looking for. Learn more or head over to the 'Store now! |
![]() |
|
|