Hi,
I'm trying to display a WHDG from code behind. At run time, I receive the following error (sorry for the French message):
Microsoft JScript runtime error: Sys.ArgumentUndefinedException: La valeur ne peut pas être non définie.Nom du paramètre : type
(translation: Value cannot be undefined, parameter name: type).
in what seems to be JS code in a file called ScriptResource.axd?IFOK_etc., line 2700. Code:
var
Sys$Component$create(type, properties, events, references, element) {
/// <summary locid="M:J#Sys.Component.create" />
/// <param name="type" type="Type"></param>
/// <param name="properties" optional="true" mayBeNull="true"></param>
/// <param name="events" optional="true" mayBeNull="true"></param>
/// <param name="references" optional="true" mayBeNull="true"></param>
/// <param name="element" domElement="true" optional="true" mayBeNull="true"></param>
/// <returns type="Sys.UI.Component"></returns>
e = Function._validateParams(arguments, [
{name:
, type: Type},
},
}
]);
e;
The code behind code looks like this (it'is in a content page of a Master page):
DataTable()
authors.Columns.Add(
)
authors.Rows.Add(
books.Columns.Add(
books.Rows.Add(
DataSet
ds.Tables.Add(authors)
ds.Tables.Add(books)
ds.Relations.Add(ds.Tables(0).Columns(0), ds.Tables(1).Columns(0))
GrilleListeCoursGroupe
.Bands.Clear()
.DataSource = ds
.DataKeyFields =
"authID"
.DataBind()
With
Hello,
I am guessing you are using VS2005.
You need to add a new WebForm to the website as an Ajax WebForm: Right-click on the website->New Item...->Ajax WebForm
Hi Alexander,
I'm using VS2008, Version 9.0.30792.1 SP, Framework 3.5 SP1. I tried your solution in a brand new solution on a page with only a WHDG with an Ajax WebForm, and with a standard aspx WebForm an I got the same error in javaScript code. I attach a screen shot of the error, that occurs after the page load Event. I'm attaching too the source code (aspx and vb), all in the same zip file.