Dave Ward's BlogDave Ward's BlogASP.NET, C#, and AJAX.code, ideas, and examples. Articles
Robust ASP.NET control referencing in JavaScript
2007-08-08 08:12:00 Easily reference your ASP.NET controls on the client side, even if their ClientIDs have been modified due to nesting: Use . More About: Javascript , Control , Ferenc , Refer
Highslide JS .NET (v0.4)
2007-08-03 16:36:00 Highslide JS .NET 0.4 is released. Major changes include fully embedding the enlarged image outline files and upgrading the underlying Highslide version to 3.2.1.
Highslide JS .NET (v0.4)
2007-08-03 16:36:00 Highslide JS .NET 0.4 is released. Major changes include fully embedding the enlarged image outline files and upgrading the underlying Highslide version to 3.2.1.
Simplify ASP.NET AJAX client-side initialization
2007-08-01 20:30:00 The ASP.NET AJAX framework automatically wires up pageLoad() as a handler to Application.Load, which can be used to avoid window.OnLoad. More About: Ajax , Side , Client
Simplify ASP.NET AJAX client-side initialization
2007-08-01 20:30:00 The ASP.NET AJAX framework automatically wires up pageLoad() as a handler to Application.Load, which can be used to avoid window.OnLoad. More About: Ajax , Side , Client
Get Yahoo?s HTTP performance analysis tool
2007-07-25 23:31:00 YSlow, Yahoo ’s previously internal-only HTTP profiling tool, has been released to the public. It extends FireBug to analyze a page and provide an optimization checklist. After experimenting with it for a bit today, I think it will quickly become as integral to my performance tuning as FireBug itself. Get it here: http://developer.yahoo.com/yslow/ More About: Performance , Analysis , Tool , Http
Get Yahoo?s HTTP performance analysis tool
2007-07-25 23:31:00 YSlow, Yahoo ’s previously internal-only HTTP profiling tool, has been released to the public. It extends FireBug to analyze a page and provide an optimization checklist. After experimenting with it for a bit today, I think it will quickly become as integral to my performance tuning as FireBug itself. Get it here: http://developer.yahoo.com/yslow/ More About: Performance , Analysis , Tool , Http
Display data updates in real-time with AJAX
2007-07-25 15:38:00 An example of how to implement real-time 'spy' type updates, using ASP.NET AJAX, web methods, and .NET caching. Full source code included. More About: Performance , Time , Data , Updates , Display
Display data updates in real-time with AJAX
2007-07-25 15:38:00 An example of how to implement real-time 'spy' type updates, using ASP.NET AJAX, web methods, and .NET caching. Full source code included. More About: Performance , Time , Data , Updates , Display
How to improve ASP.NET AJAX error handling
2007-07-18 13:13:00 An example of handling ASP.NET AJAX errors on the client side, to achieve a better user experience than the default JavaScript alert errors. More About: Ajax , Improve , Error , Rove , Improv
Easily refresh an UpdatePanel, using JavaScript
2007-07-13 13:00:00 I’ve noticed a lot of discussion lately regarding methods to refresh an UpdatePanel via client script. This is very easy on the server side, of course. You can just call UpdatePanel.Update(). However, on the client side, the most common solution I’d been seeing just didn’t feel right. Many will advise you to use ... More About: Javascript , Refresh
Why ASP.NET AJAX UpdatePanels are dangerous
2007-07-11 14:00:00 If you’re like me, it’s hard to resist the lure of tossing a half dozen UpdatePanels on every page and reveling in AJAX goodness. The UpdatePanel makes AJAX trivially easy for anyone to implement, even without knowledge of what’s actually going on behind the scenes. Unfortunately, that very lack of transparency regarding the ... More About: Performance , Ajax , Dangerous
User availability check usability improvements
2007-07-09 13:00:00 Usability improvements to inline AJAX username availability checking. Showing a progress indicator during the AJAX callback and controlling the disabled state of the submit button depending on the availability status of the chosen username. More About: Usability , Check , User , Availability , Rove
A great new AJAX site (Ajax Rain)
2007-07-03 20:19:00 I would truly like to thank whoever submitted AJAX username availability check to Ajax Rain yesterday, for introducing me to this great resource. Until seeing it as a referrer in my stats, I was unfamiliar with the site. After taking a look today, it appears to be an absolute goldmine of client side ... More About: General , Great , Site
ASP.NET AJAX username availability check
2007-07-02 19:06:00 When you have a name as common as mine, you run across the entire gamut of schemes to deal with username availability in membership systems. By availability, of course I mean denial and rejection. Out of all of the ways that I’ve had “Dave” rejected, inline AJAX verification is definitely the least annoying. ... More About: Check , Username , Availability , Ajax
The easiest way to break ASP.NET AJAX pages
2007-06-20 02:23:00 Use Response.Write(). If you’re worried that might not bring your website to its knees reliably enough, be especially sure to use Response.Write in code that’s executed during partial postbacks. It’s that easy! Emitting JavaScript probably comprises the vast majority of Response.Write uses in ASP.NET projects today. So for our purposes, let’s say that we really ... More About: Break , Ajax , Pages , Brea , Ages
Highslide JS .NET (v0.3)
2007-06-08 16:00:00 Just a quick Highslide update. The HighslideManager control now has a ControlBar property. If enabled (and it’s enabled by default), all zoomed images will have a control bar overlay. I’ve included embedded CSS, images, and cursors for the default style, pictured above. However, custom styling can be obtained via the controlbar CSS classes. Visit the Highslide ...
Highslide JS .NET (v0.2)
2007-05-02 21:23:00 Your wishes are my command. High slide JS .NET now includes support for captioning. The captions can be specified using the Caption property of each HighslideImage control, and can be easily styled using CSS. Also, ~ is now correctly replaced with the application path in path properties. Visit the Highslide JS .NET project page for more details and the download link for the new version. More About: Slide
Disable a button control during postback.
2007-04-18 04:46:00 Postback Ritalin has been getting a lot of search hits intended to find a button disable technique for full .NET postbacks. So, this example is for all of you searching for a non-AJAX solution. The trick is to use the OnClientClick and UseSubmitBehavior properties of the button control. There are other methods, involving code on the server side to add attributes, but I think the simplicity of doing it this way is much more attractive: <asp:Butt on runat="server""BtnSubmit&q uot; OnClientClick="this.disabled = true; this.value = 'Submitting...';" UseSubmitBehavior="false" "BtnSubmit_Click" Text="Submit Me!" /> OnClientClick allows you to add client side OnClick script. In this case, the JavaScript will disable the button element and change its text value to a progress message. When the postback completes, the newly rendered page will revert the button back its initial state without any additional work. The ... More About: Back , Ring , Control
Highslide JS .NET Release
2007-03-27 04:13:00 My initial .NET server control version of Torstein Honsi's High slide JS .NET is now available. You can find it and information on implementing it at the Highslide JS .NET page here on my site. For a quick video introduction of what the Highslide JS library is capable of, take a look at this basic demonstration: Remember, Torstein graciously allows completely free use of his library on non-commercial sites, but if you use it in a production environment he asks a very reasonable licensing fee per domain. Please support his efforts if you do use it on a live site. More About: Release , Slide , Lease , Ease
Image Zooming Control Preview
2007-03-22 13:00:00 I've been working on and off for some time to encapsulate Torstein Honsi's excellent Highslide JS library into a .NET control. Finally, pending naming, it is ready for use. It should be available for download in the next couple days. Until then, here is a preview of it in action: The best part is that it's extremely easy to use. This is the entirety of the code used to create the demo page above: ASP: <encosia:HighslideManager runat="server" OutlineType="RoundedWhite" GraphicsPath="highslide/" /> <encosia:HighslideImage "HighslideImage 1" runat="server" ImageUrl="Thumbnail-1.jpg" FullImageURL="Image-1.jpg" /> <encosia:HighslideImage"HighslideImage 2" runat="server" ImageUrl="Thumbnail-2.jpg" FullImageURL="Image-2.jpg" /> More About: Preview , Review , Zoom , View
Postback Ritalin Update (v0.2)
2007-03-17 05:11:00 Based on my experience using it in the wild and some great feedback from those of you that downloaded it, I’ve made a few updates to Post back Ritalin . Get it and enjoy. If you haven’t seen Postback Ritalin yet, it’s an AJAX Toolkit control extender to automatically disable an Update Panel’s submitting control during partial postbacks and then re-enable them after the partial postback completes. More details are available on the permanent Postback Ritalin page. Changes in this version Added WaitImageURL, to better support ImageButton controls that raise postbacks. Added a check to ensure that the control raising the postback is either an ImageButton or Button type, to clear up some issues with submitting a form with enter while a Textbox is focused. Added a check to make sure the control that raised the postback still exists after the postback completes, in case the newly updated div no longer contains that element (e.g. a form that transitions to a confirma... More About: Back
Debug and explore AJAX with FireBug
2007-03-06 14:41:00 “where did you find documentation on the sender and event args objects in the PageRequestManager events?” Lately, if I don’t hear that question at least a dozen times a week, I start worrying that something’s wrong with my contact form. I can understand why it would be a common question. The documentation we currently have for the JavaScript portion of the AJAX framework is on the light side. The answer to the question is that I didn’t, but I can show you how I found what I did. By using a JavaScript debugger, it becomes trivially easy to explore these objects and find out what makes them tick, even without formal documentation. Personally, I use Fire Bug for JavaScript debugging, so that’s what I’ll use to demonstrate. Any JavaScript debugger that allows you to set breakpoints will work though. The code that I’m going to use for this example is my CSS style as AJAX progress indicator tutorial. With FireBug open (F12), I load up th... More About: Ajax , Explore , Debug
AJAX, file downloads, and IFRAMEs
2007-02-23 18:08:00 "Click here to download this report in Excel (CSV) format." We've probably all implemented this functionality in ASP.NET applications at least several times. Any time you're dealing with report data, it's expected that the data be available for download. Unfortunately, AJAX makes this somewhat difficult. Since there is no traditional HTTP response, you have no context with which to send the file to the browser for normal download. Enter inline frames (IFRAME). Probably one of the most under utilized HTML elements around, dynamically creating an IFRAME allows you to round trip an HTTP request and response without disrupting the AJAX-ness of your async postback. Since any browser that supports XmlHttpRequest supports IFRAMEs, it is as safe to use as AJAX is in the first place. This is a simple example of the technique, using a static list of files in a dropdown, but it could be adapted to more dynamic file creation scenarios easily. This is the example download page. The Jav... More About: Downloads , Download , File , Ajax , Down
Control to prevent multiple AJAX submits
2007-02-13 07:56:12 “To avoid duplicate credit card charges, only click the checkout button once!” I’m always surprised at how many sites display a similar warning message on their final checkout page. Major sites. Between server side detection of multiple submissions and using OnClick to disable the submit button, there is no excuse for crossing your fingers ... More About: Event , Multi , Ajax , Control , Submit
Control to prevent multiple AJAX submits
2007-02-13 04:33:00 "To avoid duplicate credit card charges, only click the checkout button once!" I'm always surprised at how many sites display a similar warning message on their final checkout page. Major sites. Between server side detection of multiple submissions and using OnClick to disable the submit button, there is no excuse for crossing your fingers and hoping your users don't double click a submit button. AJAX complicates the client side component of this equation. You can't simply disable a button in the OnClick event, because the button will remain disabled in the case of a failed form validation or other exception. The optimal behavior is for the submit button to only be disabled during the async postback, and be re-enabled when the server side processing is completed. Using the AJAXToolKit, I've created a control extender to implement this functionality quickly and easily: Postback Ritalin. Usage example ASP: <asp:UpdatePanel"up1" runat="server"> <ContentT... More About: Event , Multi , Ajax , Control , Submit
Automatic Sequential Postbacks
2007-02-02 19:51:08 I ran into a situation recently where I needed to select a set of data, present it to the user, and then give them the option to process each item individually or all items automatically. Problem was, the item processing task was long running, which complicated the ?process all items? scenario. Looping ... More About: Post , Auto , Automatic , Back , Sequential
Automatic Sequential Postbacks
2007-02-02 10:15:00 I ran into a situation recently where I needed to select a set of data, present it to the user, and then give them the option to process each item individually or all items automatically. Problem was, the item processing task was long running, which complicated the “process all items” scenario. Looping through each item and processing it all on the server side would’ve been easy enough to accomplish, but the chances of the user sitting through the 7 minute postback for 20 items was next to nil. What I really needed was incremental progress feedback, so the user could see an update as each item was processed. Luckily, I did have control over my user’s browser version and settings, so client scripting was available. With that in mind, this is the solution I came up with: Display the Items and Interface This sets up some test data, a repeater to display it, and the button controls to initiate processing. Note the runat and ID attributes of the body tag. This is important... More About: Post , Auto , Automatic , Back , Sequential
ASP.NET AJAX v1.0 Released
2007-01-25 07:41:01 http://ajax.asp.net/ This will be huge. This is also the first officially supported Microsoft release that includes full source code. More About: Released , Ajax , Release , Lease , Ease
SWF to XAML (WPF) Converter
More articles from this author:2007-01-23 19:39:01 I've been having lots of fun with WPF/E, and this thing has been a great help in getting me jumpstarted: http://www.mikeswanson.com/swf2xaml/ Hopefully others will find it useful as well. More About: Converter , Convert , Vert 1, 2, 3, 4, 5 |



