xmlHttp + web services + help needed
-
Hi Friends I am creating a web service to use bot in asp and asp.net. its working in both but problem is it returns long string or text value while i want to return values in the form array my servcice is like this publi string[] getinfo(int companyid){ string[] myInfo=new string[2]; myInfo[0]="My Company"; myInfo[0]="Address1"; myInfo[0]="Address2"; return myInfo; } i am using in asp Response.Writ(xmlhttp.responseText) this statement is giving me resut My Company Address1 Address2 I want to store these values in different variables to for the future use, any one can help me please. how can i put those values in variables.
Naveed Kamboh
-
Hi Friends I am creating a web service to use bot in asp and asp.net. its working in both but problem is it returns long string or text value while i want to return values in the form array my servcice is like this publi string[] getinfo(int companyid){ string[] myInfo=new string[2]; myInfo[0]="My Company"; myInfo[0]="Address1"; myInfo[0]="Address2"; return myInfo; } i am using in asp Response.Writ(xmlhttp.responseText) this statement is giving me resut My Company Address1 Address2 I want to store these values in different variables to for the future use, any one can help me please. how can i put those values in variables.
Naveed Kamboh
Hi Can you please use XML for output so that you can parse the XML in the asp or asp.net pages and store you output in variables Regards
Tushar kothari
-
Hi Can you please use XML for output so that you can parse the XML in the asp or asp.net pages and store you output in variables Regards
Tushar kothari
thanks how can i do that? any article or coded pls thanks in advance
Naveed Kamboh
-
thanks how can i do that? any article or coded pls thanks in advance
Naveed Kamboh
Hi You can return XML node from the Web Method and then on other end you have to store that XML node and after parsing you will get the values. Following is the sample code for that public function A() as XMLNode dim XND as new XMLNode .....your code.... .....Store the output in the XML Node return XND On ASPX page dim XNDC as XMLNode XNDc = .A() Then you can parse the xml node for you outout Regards
Tushar kothari