Sunday, October 28, 2007

Regular Expression Library and Cheat Sheet

I was writing some validation expressions for my pages and started to get lazy. So here is a library of commonly used - and tested - regular expressions that can save time from writing them from scratch. There are also many other useful resources around the site.

Regular Expression Library

kick it on Shout it

DataFormat Strings with GridView and BoundField

Like Rick I find myself forgetting all those little tricks that have to be done to get a project working. So here is my reminder...

Formatting fields with GridView and BoundField

kick it on Shout it

Friday, October 26, 2007

URL Rewriting in ASP.NET

Here is a good reference for the options available for Url rewriting. I have ended up using a Url Rewriting dispatch mechanism. Hopefully I'll have time to write about it!

URL Rewriting in ASP.NET

kick it on Shout it

Tuesday, October 23, 2007

Frustrating Error: No Corresponding Start Element Open

If you have been searching and have found this then you have probably had a frustrating hour or more with an error of "No Corresponding Start Element Open". No doubt you have rebuilt your WCF service, updated the service reference, maybe even removed and re added the service reference. Still you'll have the error.

So maybe one of a couple of things are happening. If your client is not WCF then maybe the generation of the service proxy is making some parameters optional in the request or response. In this case have a read of this article to get a better idea of what is happening.
Eugene Osovetsky's Blog : Solving the "disappearing data" issue when using Add Web Reference or Wsdl.exe with WCF services

However, in my case I have WCF as the client - something else is awry. One thing to check is if you have a Dataset in your method signature. If the service call is returning null instead of a Dataset instance then this error will come up. There are a couple of options - return an empty Dataset or set the EmitDefaultValue attribute on the argument. Read more about that here No Corresponding Start Element Open

kick it on Shout it

Monday, October 22, 2007

Implementing network credentials for ReportViewer

When the reporting control is not hosted under the same credentials as the reporting server, the network credentials need to be set for a ReportViewer control. Here is an easy way to do that.

reportViewer.ServerReport.ReportServerCredentials.NetworkCredentials readonly - MSDN Forums

kick it on Shout it

Tuesday, October 16, 2007

Easily refresh an UpdatePanel, using JavaScript

Another way to refresh an Atlas AJAX UpdatePanel from a client side event. This also mentions other ways, such as hidden submit buttons, which can be used.
Easily refresh an UpdatePanel, using JavaScript Encosia

kick it on Shout it