English 中文(简体)
序号数据表
原标题:serialize datatable to JSON issue vb.net

Ok, I m 试图在vb.net中编辑一个数据表:

Dim dt As New System.Data.DataTable

并且用于序列器:

Dim js As JavaScriptSerializer = New JavaScriptSerializer()
dim jsonString as string
jsonString=js.serialize(dt)

when it serialize the data table on the last line, it got an error:

An unhandled exception of type System.InvalidOperationException occurred in System.Web.Extensions.dll

补充资料: 在序列化一个类型系统标的时,发现了一个通知。 全球化。 文化信息

我甚至只用1栏和1行打上了最简单的数据表,但只是打上序号,

我知道,这一问题得到了回答:

but I don t know how to implement the answer (make a new class), or maybe there s an even better solution?

问题回答




相关问题
Is Shared ReadOnly lazyloaded?

I was wondering when I write Shared ReadOnly Variable As DataType = New DataType() Or alternatively Shared ReadOnly Variable As New DataType() Is it lazy loaded or as the instance initializes? ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

Choose Enter Rather than Pressing Ok button

I have many fields in the page and the last field is a dropdown with list of values. When I select an item in a dropdown and press Enter, it doesn t do the "Ok". Instead I have to manually click on Ok ...

ALT Key Shortcuts Hidden

I am using VS2008 and creating forms. By default, the underscore of the character in a textbox when using an ampersand is not shown when I run the application. ex. "&Goto Here" is not ...

Set Select command in code

On button Click I want to Set the Select command of a Gridview. I do this and then databind the grid but it doesn t work. What am i doing wrong? protected void bttnView_Click(object sender, ...

Hover tooltip on specific words in rich text box?

I m trying to create something like a tooltip suddenly hoovering over the mouse pointer when specific words in the richt text box is hovered over. How can this be done?

热门标签