Visual Basic .NET » ASP.NET General Discussion
passing client date to server -- John Kennedy --


Sorry not date, data. I'm trying to pass the array to the server.

-----Original Message-----
From: ajaxpro
Re: passing clent date to server
Hi,

I cannot see any "date", and you have to use a string array for your method. Maybe you asked for something different, can you be a little bit clearer? Thanks!

Regards,
Michael

On 7/9/06, jkenne19 wrote:

I need help passing an array from a JavaScript functions to the sever.
I am using the 1.4 frame work.

Here is the example that I'm trying to use.

function UpdateData()
{

ArrayData.Rows
.name = "name";
ArrayData.Rows
.name2 = "Names2";
ArrayData.Rows
.address = "Address";
ArrayData.Rows
.city = "City";
ArrayData.Rows
.zipcode = "Zipcode";
ArrayData.Rows
.telephone = "Telephone";
ArrayData.Rows
.Fax = "Fax";
ArrayData.Rows
.email = "Email";
AddEditData.GetDateData (ArrayData,GetMessageOfTheDay_CallBack);
}

Server said code

public string GetDateData(string
StrData)
{
return BuildUpdateData(StrData);
}
>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info


-- Michael Schwarz --


and what is ArrayData.Rows?

On 7/10/06, John Kennedy wrote:

Sorry not date, data. I'm trying to pass the array to the server.

-----Original Message-----
From: ajaxpro
On Behalf
Of Michael Schwarz
Sent: Sunday, July 09, 2006 6:20 PM
To: ajaxpro
Subject:
Re: passing clent date to server
Hi,

I cannot see any "date", and you have to use a string array for your
method. Maybe you asked for something different, can you be a little
bit clearer? Thanks!

Regards,
Michael

On 7/9/06, jkenne19 wrote:
>
> I need help passing an array from a JavaScript functions to the sever.
> I am using the 1.4 frame work.
>
> Here is the example that I'm trying to use.
>
> function UpdateData()
> {
>
> ArrayData.Rows
.name = "name";
> ArrayData.Rows
.name2 = "Names2";
> ArrayData.Rows
.address = "Address";
> ArrayData.Rows
.city = "City";
> ArrayData.Rows
.zipcode = "Zipcode";
> ArrayData.Rows
.telephone = "Telephone";
> ArrayData.Rows
.Fax = "Fax";
> ArrayData.Rows
.email = "Email";
> AddEditData.GetDateData (ArrayData,GetMessageOfTheDay_CallBack);
> }
>
> Server said code
>

> public string GetDateData(string
StrData)
> {
> return BuildUpdateData(StrData);
> }
>
>
> >
>
--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info

>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info
-- John Kennedy --


Ok I was able to get a part of it working by upgrading to the newes version.
But I'm still not able to see the data. I'm sending the same dataset I received from the server back to the server after some changes have been made by the client. I'm not creating a new table. Here is my code. The JavaScript is the same.

I get the error at this line:
object oWrapper =
oConverter.Deserialize(DataObject,Type.GetType("System.Data.DataSet"));

Code:


public string GetShipperUpDateData(AjaxPro.JavaScriptObject DataObject)
{
return BuildData(DataObject);
}

public string BuildData(AjaxPro.JavaScriptObject DataObject)
{
string Str = "Test ";
AjaxPro.DataSetConverter oConverter = new AjaxPro.DataSetConverter();
try
{

object oWrapper =
oConverter.Deserialize(DataObject,Type.GetType("System.Data.DataSet"));
DataSet oDS = (DataSet) oWrapper;
}
catch (Exception ex)
{
Response.Write("The query is " +
ex.ToString());
Response.Write("
");

}
return Str;
}

-----Original Message-----
From: ajaxpro
Re: passing client date to server
and what is ArrayData.Rows?

On 7/10/06, John Kennedy wrote:

Sorry not date, data. I'm trying to pass the array to the server.

-----Original Message-----
From: ajaxpro
On Behalf
Of Michael Schwarz
Sent: Sunday, July 09, 2006 6:20 PM
To: ajaxpro
Subject:
Re: passing clent date to server
Hi,

I cannot see any "date", and you have to use a string array for your
method. Maybe you asked for something different, can you be a little
bit clearer? Thanks!

Regards,
Michael

On 7/9/06, jkenne19 wrote:
>
> I need help passing an array from a JavaScript functions to the sever.
> I am using the 1.4 frame work.
>
> Here is the example that I'm trying to use.
>
> function UpdateData()
> {
>
> ArrayData.Rows
.name = "name";
> ArrayData.Rows
.name2 = "Names2";
> ArrayData.Rows
.address = "Address";
> ArrayData.Rows
.city = "City";
> ArrayData.Rows
.zipcode = "Zipcode";
> ArrayData.Rows
.telephone = "Telephone";
> ArrayData.Rows
.Fax = "Fax";
> ArrayData.Rows
.email = "Email";
> AddEditData.GetDateData (ArrayData,GetMessageOfTheDay_CallBack);
> }
>
> Server said code
>

> public string GetDateData(string
StrData)
> {
> return BuildUpdateData(StrData);
> }
>
>
> >
>
--
Best regards | Schöne Grüße
Michael

Microsoft MVP - Most Valuable Professional
Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info

>

--  

Best regards | Schöne Grüße Michael

Microsoft MVP - Most Valuable Professional Microsoft MCAD - Certified Application Developer

http://weblogs.asp.net/mschwarz 
/
http://www.schwarz-interactive.de 
/
mailto:info


[Submit Comment]Home