Friday, 24 April 2009
Reference jQuery and ASP.NET Ajax scripts from your JavaScript File
/// <reference path="MicrosoftAjaxTemplates.debug.js" />
/// <reference path="MicrosoftAjaxAdoNet.debug.js" />
/// <reference path="jquery-1.3.1-vsdoc.js" />
As simple as inserting the above code at the top of your .js code and you can have intellisense making your coding a lot easier.
codeproject
Friday, 10 April 2009
using code instead of declaratively attaching the DataView
http://www.techbubbles.com/aspnet/data-view-control-in-aspnet-ajax-4-preview-4/
Wednesday, 8 April 2009
This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
This relates to the blog for this same problem with WCF that Rob Zelt posted and it is pretty much the same just adapted for ADO.NET Data Services
If you have the error:
This collection already contains an address with scheme http. There can be at most one address per scheme in this collection.
Parameter name: item
Then enter this code at the bottom in a new class and change the svc file
Factory="CustomHostFactory"
and all being well it should remove the error.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.Data.Services;
class CustomHostFactory : DataServiceHostFactory
{
protected override ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
CustomHost customServiceHost = new CustomHost(serviceType, baseAddresses[1]);
return customServiceHost;
}
}
class CustomHost : DataServiceHost
{
public CustomHost(Type serviceType, params Uri[] baseAddresses) : base(serviceType, baseAddresses)
{ }
protected override void ApplyConfiguration()
{
base.ApplyConfiguration();
}
}