开发者

Silverlight: Return Value from Web Service

I created a web service TestService.svc. I'm trying to return a struct from a web service to the Silverlight control. I defined the struct as public in the SilverlightApplication.Web 开发者_开发百科project, but under SilverlightApplication1 where the xaml files are, that struct is not viewable. Basically I'm trying to return several columns from a database.


Your web service and silverlight run in different places. Silverlight runs in browser and web service runs on server. They do not use the same .net profile. So if you want to reuse your data type. You have to rebuild it in your silverlight app by auto copying the source code from web serivce to it. But another way is to create a .net client profile project and put your data type in. Both your SL and WS application need to reference it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜