Problem: ASP.NET Custom Controls, Custom Types and Web Services
OK, so I am sat here at work doing the usual keyboard smashing when I come across a problem, any/all help would be greatly appreciated as a lot of this is new to me…
I need to create a custom control to present data based on the properties of a custom type. This type contains some summary properties, and a couple of internal collections of items. The presentation logic of this is to be encapsulated in its own ASP.NET control.
I have a ASP.NET web page, which will be the container for the control. This page will fetch the data for the control within the Page_Load event, when it receives the object back from the Web Service is should then pass the object to the control, which will render it.
Now, the control is designed to work with the same return type as the web service method, so they should both be talking about the same thing, however this is not the case, since the compiler is coming back saying that they are different types, because one is reporting as WebService.CustomType and the other is ControlLibrary.CustomType. So both are in essence the same type, but since the one from the web service is being described via the WSDL, its “appearing” different.I have tried performing a manual cast, but it doesn’t like that either…
Any/all help would be greatly appreciated!Share: digg it! | del.icio.us | Live | Technorati | Facebook