>If you update your proxy to use properties does it continue >to work for what you need to do with and then work with the controls as >well?
Well, the proxy is automatically generated by Microsoft, so I can't really change it. Unless there's a way to tell WSDL.EXE to generate the proxies with property getters/setters instead of using fields, and I'm just missing it. I would think that using web controls to display the results of web service queries would be a not-uncommon thing to try to do. I'm surprised .Net doesn't support this scenario. On Thu, 25 Apr 2002 11:40:07 -0500, Matt Milner <[EMAIL PROTECTED]> wrote: >More than likely that control uses the GetPropertyValue method of the >DataBinder class. This method, in turn, uses the GetProperties method of >the System.ComponentModel.TypeDescriptor class to get the properties for the >object and then try to find one named what you put in for the various >properties on the control. > >so, the answer to your question is that I don't think this will work for a >public field. If you update your proxy to use properties does it continue >to work for what you need to do with and then work with the controls as >well? > >HTH, >Matt > >-----Original Message----- >From: Kevin Dente >To: [EMAIL PROTECTED] >Sent: 4/25/02 10:11 AM >Subject: [DOTNET] ListControl data binding and fields > >Does anyone know if there's a way to get web form ListControl data >binding >to work with public fields as well as public properties when binding to >an >array of objects (not a dataset)? When I set the DataTextField property >to >a public field name, the control throws an exception, but if it's a >property, it works fine. > >If you're wondering why I would be creating a class with public fields, >I'm >not - the objects are web service proxies automatically generated by >Microsoft's WSDL.EXE. It generates them with public fields rather than >property getter/setters. My web service method returns an array of these >things, and I would like to be able to take advantage of data binding to >display them in a web form app. It doesn't look good for that idea at >the >moment. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, >or >subscribe to other DevelopMentor lists at http://discuss.develop.com. > >You can read messages from the DOTNET archive, unsubscribe from DOTNET, or >subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.