I wanted to integrate the JQuery UI Dialog with a ASP.NET project so I created a C# class to wrap the functionality and make it easy to configure
I have a website getting occasional database disconnections throwing the error - A network-related or instance-specific error occurred while establishing a connection to SQL Server. Its been difficult locating the cause of the error as there appears to be nothing wrong. I have the same code running multiple websites and only one of the sites is plagued by the error so I figure it must be some configuration problem either with IIS or the MS SQL database.
It struck me the other day that it is so easy to use AJAX with ASP.NET it can make you lazy. I was working on a project where I had some radio boxes and based in the selection of the radio boxes another fields was displayed or hidden. I didn't want the page to post back so initially it though I'll just pop it in a AJAX UpdatePanel and write some code to show or hide the fields after the selection is made on the RadioButtonList.
Sorting items in a database using SQL is easy, simply order by whatever field you want that supports sorting, its easy to take that power for granted. But what if you already have your data in the form of a generic object collection which you want to sort. It turns out to be quite simple, all you need to do is create a collection of System.Collections.Generic.List and call the Sort() method.
I upgraded some projects to Visual Studio 2008, in the project I was using a WSE 3.0 web service. The project compiled fine but I found when I updated the web service I was using the proxy class that was generated did not work. The proxy class inherited from System.Web.Services.Protocols.SoapHttpClientProtocol instead of Microsoft.Web.Services3.WebServicesClientProtocol. This was quite a problem I didn't fancy having to manually recreate it each time wanted to update the WSE 3.0 web service.
SWFObject.NET is a C# ASP.NET server control that wraps the functionality of the SWFObject 2.2 JavaScript library. The 1.1.1 release includes a bug fix for the incorrect the embedded 'Get Flash Image' URL.
SWFObject.NET 1.1 has been released. SWFObject.NET is a C# ASP.NET server control that wraps the functionality of the SWFObject 2.2 JavaScript library. SWFObject works great to avoid the ‘click to activate’ problems that affected IE6, IE7 and Opera 9+.
Implementing keyboard shortcuts can greatly improve the user interface of your web application. Interface navigation is a good place to start, for example if you are viewing a slide show of photos you may expect to be able to navigate through the photos using the left and right arrow keys on you keyboard. For an application that has a popup dialog very common functionality is the ablity to push the escape key to cancel the dialog and close it.
Using ASP.NET Ajax it is really easy to excute a server side method and return some form data. In some cases you can implement Ajax functionality without chaning your code. It is more efficent than submitting the whole page but if you are using an UpdatePanel the server returns all of the Html contained in the UpdatePanel. This is not so bad if you only have a few controls but if you have a table witha number of fields the data returned can be quite large. Taking that one step further is client side binding to load form data.
Today I tried migrating my current project from using MSSQL Server to use MySQL Server. Theoretically this should be easy because my project uses NHibernate. As long as the structure of the MySQL database is the same as the MSSQL database I should be able to just change the NHibernate configuration