Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Error message
posted

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

 

 

$create = Sys.Component.create = function

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>

 

 

var

e = Function._validateParams(arguments, [

{name:

 

"type"

, type: Type},

{name:

 

"properties", mayBeNull: true, optional: true

},

{name:

 

"events", mayBeNull: true, optional: true

},

{name:

 

"references", mayBeNull: true, optional: true

},

{name:

 

"element", mayBeNull: true, domElement: true, optional: true

}

]);

 

 

if (e) throw

e;

The code behind code looks like this (it'is in a content page of a Master page):

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Dim authors As New

DataTable()

authors.Columns.Add(

 

"authID"

)

authors.Columns.Add(

 

"Name"

)

authors.Rows.Add(

 

"001", "J.R.R. Tolkien"

)

authors.Rows.Add(

 

"002", "S. King"

)

authors.Rows.Add(

 

"003", "J.K. Rowlings"

)

 

 

Dim books As New

DataTable()

books.Columns.Add(

 

"authID"

)

books.Columns.Add(

 

"BookTitle"

)

books.Rows.Add(

 

"001", "Lord of the rings - 1"

)

books.Rows.Add(

 

"001", "Lord of the rings - 2"

)

books.Rows.Add(

 

"001", "Lord of the rings - 3"

)

books.Rows.Add(

 

"001", "The Silmarillon"

)

books.Rows.Add(

 

"001", "Faerie"

)

books.Rows.Add(

 

"002", "Insomnia"

)

books.Rows.Add(

 

"002", "Christine"

)

books.Rows.Add(

 

"002", "Carrie"

)

books.Rows.Add(

 

"003", "Harry Potter 1"

)

books.Rows.Add(

 

"003", "Harry Potter 2"

)

books.Rows.Add(

 

"003", "Harry Potter 3"

)

books.Rows.Add(

 

"003", "Harry Potter 4"

)

books.Rows.Add(

 

"003", "Harry Potter 5"

)

books.Rows.Add(

 

"003", "Harry Potter 6"

)

books.Rows.Add(

 

"003", "Harry Potter 7"

)

 

 

Dim ds As New

DataSet

ds.Tables.Add(authors)

ds.Tables.Add(books)

ds.Relations.Add(ds.Tables(0).Columns(0), ds.Tables(1).Columns(0))

 

 

With

GrilleListeCoursGroupe

.Bands.Clear()

.DataSource = ds

.DataKeyFields =

 

"authID"

.DataBind()

 

 

End

With

 

Parents Reply Children