Click here to Skip to main content
15,914,924 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need C# training course (preferably video) Pin
logikos18-Feb-08 3:36
logikos18-Feb-08 3:36 
GeneralRe: Need C# training course (preferably video) Pin
Pete O'Hanlon18-Feb-08 3:42
mvePete O'Hanlon18-Feb-08 3:42 
GeneralRe: Need C# training course (preferably video) Pin
logikos18-Feb-08 4:13
logikos18-Feb-08 4:13 
GeneralRe: Need C# training course (preferably video) Pin
Pete O'Hanlon18-Feb-08 4:25
mvePete O'Hanlon18-Feb-08 4:25 
GeneralRe: Need C# training course (preferably video) Pin
logikos18-Feb-08 5:06
logikos18-Feb-08 5:06 
Generalxsd file from xml Pin
topksharma198218-Feb-08 2:52
topksharma198218-Feb-08 2:52 
GeneralRe: xsd file from xml Pin
Mircea Puiu18-Feb-08 3:48
Mircea Puiu18-Feb-08 3:48 
QuestionHow do display all the fields on C# ASP.NET getting from webservices. Pin
Tamizh18-Feb-08 2:51
Tamizh18-Feb-08 2:51 
Hai all,

I am getting error in while access the webService values in C#ASP.NET form.

My Code is

WEBSERVICE: Name(localhost\TestWebService\firstService.asmx)
----------
public struct structClientData
{
public string Name;
public int ID;
}
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class firstService : System.Web.Services.WebService
{
[WebMethod]
public string HelloWorld() {
return "Hello World";
}

[WebMethod(Description = "Get the client Name and ID")]
public structClientData[] GetClientInfo(int Number)
{
structClientData[] objClientDatas = null;
if (Number > 0 && Number <= 10)
{
objClientDatas = new structClientData[Number];
for (int i = 0; i < Number; i++)
{
objClientDatas[i].Name = "Clinet" + Number.ToString();
objClientDatas[i].ID = Number;
}
}
return objClientDatas;
}
}

I want display that web service return all values on Default.aspx Page.

My error ASPX code is:

Button1_Click()
{
firstService obj1Service =new firstService();
try
{
string[] str=obj1Service.GetClientInfo(int.Parse(TextBox1.Text));
[fill up remaining code] or [your suggession code]
}
catch
{

}
}

Error is :
----------
Cannot implicitly convert type 'localhost.structClientData[]' to string[]'






advance Thanks a lot.

Thanks and Regards
TamizhMS
GeneralRe: How do display all the fields on C# ASP.NET getting from webservices. Pin
Pete O'Hanlon18-Feb-08 3:41
mvePete O'Hanlon18-Feb-08 3:41 
QuestionRe: How do display all the fields on C# ASP.NET getting from webservices. Pin
Tamizh24-Feb-08 23:37
Tamizh24-Feb-08 23:37 
QuestionC# MySQL----parameter '?9' not found in the collection...huh? Pin
js8008518-Feb-08 2:15
js8008518-Feb-08 2:15 
AnswerRe: C# MySQL----parameter '?9' not found in the collection...huh? Pin
CKnig18-Feb-08 3:08
CKnig18-Feb-08 3:08 
GeneralRe: C# MySQL----parameter '?9' not found in the collection...huh? Pin
js8008518-Feb-08 3:40
js8008518-Feb-08 3:40 
Generalerror in sql Pin
new2pgrmg18-Feb-08 2:06
new2pgrmg18-Feb-08 2:06 
GeneralRe: error in sql Pin
Not Active18-Feb-08 2:29
mentorNot Active18-Feb-08 2:29 
Questionset socket.sendtimeout Pin
sindhutiwari17-Feb-08 22:55
sindhutiwari17-Feb-08 22:55 
GeneralRe: set socket.sendtimeout Pin
Luc Pattyn18-Feb-08 1:09
sitebuilderLuc Pattyn18-Feb-08 1:09 
GeneralBest method for updating control in another form Pin
N a v a n e e t h17-Feb-08 22:05
N a v a n e e t h17-Feb-08 22:05 
GeneralRe: Best method for updating control in another form Pin
Pete O'Hanlon17-Feb-08 22:11
mvePete O'Hanlon17-Feb-08 22:11 
GeneralRe: Best method for updating control in another form Pin
N a v a n e e t h17-Feb-08 22:13
N a v a n e e t h17-Feb-08 22:13 
GeneralRe: Best method for updating control in another form Pin
Pete O'Hanlon17-Feb-08 22:20
mvePete O'Hanlon17-Feb-08 22:20 
GeneralRe: Best method for updating control in another form Pin
N a v a n e e t h17-Feb-08 22:30
N a v a n e e t h17-Feb-08 22:30 
GeneralRe: Best method for updating control in another form Pin
Pete O'Hanlon17-Feb-08 22:33
mvePete O'Hanlon17-Feb-08 22:33 
GeneralRe: Best method for updating control in another form Pin
N a v a n e e t h17-Feb-08 22:39
N a v a n e e t h17-Feb-08 22:39 
GeneralRe: Best method for updating control in another form Pin
Pete O'Hanlon17-Feb-08 22:50
mvePete O'Hanlon17-Feb-08 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.