我是新的方案拟订工作,因此,请与我一起发言。
<<>Background
我创建了一个支部职能,收集了案文、顶顶和左侧各文本箱的坐标,我希望利用AJAX POST将所有这些信息通过C#的网络服务。
我成功地将这一数据通过到网络服务方法中,并在一个数据库中插入一个记录(我赢得了时间。
In order to write data for multiple text boxes, I am using a jQuery function containing an array of objects, for which I have taken inspiration from the first option in the following post: Jquery multidimensional arrays
www.un.org/Depts/DGACM/index_spanish.htm 我的法典:
function Note(noteText, topCoord, leftCoord) {
return {
noteText: noteText,
topCoord: topCoord,
leftCoord: leftCoord
}
var noteData = [];
function SaveNote() {
{ input ).filter("notes").each(function(index) {
var noteText = ($this)).val();
var coord = ($this)).offset();
var topCoord = coord.top;
var leftCoord = coord.left;
noteData.push(Note(noteText,topCoord,leftCoord));
var jsonText = JSON.stringify({ noteData : noteData});
});
D. 警示变量json 案文 我收到下列文件:
{"noteData":[{"noteText":"This is note text" ; "topCoord":23.33 ; "leftCoord":12.23}, {"noteText":"Note text 2" ; "topCoord":23.33 ; "leftCoord":12.23}]}
www.un.org/Depts/DGACM/index_spanish.htm 问题:
- This is great! But how can I decode this data within the web method in C# so that I can access each piece of data to eventually write a record to a SQL database for each Note object .
I hope this makes sense. Thank you in advance.