all groups > asp.net datagrid control > december 2005 >
You're in the

asp.net datagrid control

group:

Could not find a property named in ASP.NET 2.0


Could not find a property named in ASP.NET 2.0 Bart
12/9/2005 5:39:05 AM
asp.net datagrid control:
Hi,
I get this exepction

"Could not find a property named 'COM_NAME' on the type specified by the
DataObjectTypeName property in ObjectDataSource 'ObjectDataSource1'."

when i try to update a detailgrid or form.
The detail grid is bound to an objectdatasource control

RE: Could not find a property named in ASP.NET 2.0 v-kevy NO[at]SPAM online.microsoft.com
12/10/2005 12:00:00 AM
Hi,

Based on the error message, are you updating an ObjectDataSource object to
tthe data source? is there a property named 'COM_NAME' in the object? Are
you doing some COM interop in your code?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."
RE: Could not find a property named in ASP.NET 2.0 Bart
12/11/2005 9:27:02 AM
Hi Kevin,

The objectdatasource is indeed updating the database.
There is a COM_NAME field(I have it also on other objectdatasource's)
The object datasource is calling a webservice proxy generated via WSE 3.0
When I call the proxy via a winforms client I don't have any problem
updating the data.

Thanks
Bart

[quoted text, click to view]
RE: Could not find a property named in ASP.NET 2.0 Bart
12/12/2005 4:43:01 AM
Hi Steven,

below you see my code snipped of the asp.net 2.0 form:

<asp:FormView ID="FormView1" runat="server" BackColor="LightGoldenrodYellow"
BorderColor="Tan"
BorderWidth="1px" CellPadding="2" DataKeyNames="COM_ID"
DataSourceID="ObjectDataSource1"
ForeColor="Black" Width="300px"
meta:resourcekey="FormView1Resource1">
<EditItemTemplate>
<table style="width: 220px">
<tr>
<asp:TextBox ID="COM_NAMETextBox" runat="server"
Text='<%# Bind("COM_NAME") %>'
meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
......
</asp:FormView>


ObjectDataSource1 code snipped:

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
DataObjectTypeName="YCommDataSet+COMPANYDataTable"
SelectMethod="GetCompany" TypeName="BusinessProxy"
UpdateMethod="SaveCompany"></asp:ObjectDataSource>

This is the property COM_NAME generated by the WSE 3.0 tool wsewsdl3.exe:
public string COM_NAME {
get {
return ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
}
set {
this[this.tableCOMPANY.COM_NAMEColumn] = value;
}
}

[quoted text, click to view]
RE: Could not find a property named in ASP.NET 2.0 stcheng NO[at]SPAM online.microsoft.com
12/12/2005 11:22:43 AM
Thanks for your response Bart,

So do you mean that the "COM_NAME" is a normal public field rather than a
property in your objectdatasoure or the configured dataobject class? If
so, based on my understanding, those datacontrol which define some XXXField
property use reflection to dynamically query the member (of that field
name) in the class, and it only support querying Properties rather than
field, so if you're using field, I'd suggest you try changing it to
property instead.... In addition, if convenient, you can also create a
simplified example of the datasource object you used to us so that we can
have a more detailed view on it...

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
<YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Sun, 11 Dec 2005 09:27:02 -0800
| Lines: 25
| Message-ID: <324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Kevin,
|
| The objectdatasource is indeed updating the database.
| There is a COM_NAME field(I have it also on other objectdatasource's)
| The object datasource is calling a webservice proxy generated via WSE 3.0
| When I call the proxy via a winforms client I don't have any problem
| updating the data.
|
| Thanks
| Bart
|
[quoted text, click to view]
|
| > Hi,
| >
| > Based on the error message, are you updating an ObjectDataSource object
to
| > tthe data source? is there a property named 'COM_NAME' in the object?
Are
| > you doing some COM interop in your code?
| >
| > Kevin Yu
| > =======
| > "This posting is provided "AS IS" with no warranties, and confers no
| > rights."
| >
| >
|
RE: Could not find a property named in ASP.NET 2.0 Bart
12/13/2005 2:14:03 AM
Hi Steven, showing the data is no problem. The GetCompany funtion works fine.
It is the update that isn't working and producing this error.

Can I send you the proxy class by email?

Thanks
Bart

[quoted text, click to view]
RE: Could not find a property named in ASP.NET 2.0 stcheng NO[at]SPAM online.microsoft.com
12/13/2005 9:10:14 AM
Hi Bart,

Thanks for the followup.
Seems a bit strange. Would you try just creating a list (Array) of the
objects returned by "GetCompany" method, and directly bind the list to the
GridView control so see whether it can display well? Or If possible you can
simplified the WSDL document and paste to me
so that I can create a proxy class locally and test it ....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
<YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
<324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
<Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Mon, 12 Dec 2005 04:43:01 -0800
| Lines: 118
| Message-ID: <130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Steven,
|
| below you see my code snipped of the asp.net 2.0 form:
|
| <asp:FormView ID="FormView1" runat="server"
BackColor="LightGoldenrodYellow"
| BorderColor="Tan"
| BorderWidth="1px" CellPadding="2"
DataKeyNames="COM_ID"
| DataSourceID="ObjectDataSource1"
| ForeColor="Black" Width="300px"
| meta:resourcekey="FormView1Resource1">
| <EditItemTemplate>
| <table style="width: 220px">
| <tr>
| <asp:TextBox ID="COM_NAMETextBox" runat="server"
| Text='<%# Bind("COM_NAME") %>'
| meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| .....
| </asp:FormView>
|
|
| ObjectDataSource1 code snipped:
|
| <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| SelectMethod="GetCompany" TypeName="BusinessProxy"
| UpdateMethod="SaveCompany"></asp:ObjectDataSource>
|
| This is the property COM_NAME generated by the WSE 3.0 tool wsewsdl3.exe:
| public string COM_NAME {
| get {
| return ((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| }
| set {
| this[this.tableCOMPANY.COM_NAMEColumn] = value;
| }
| }
|
[quoted text, click to view]
|
| > Thanks for your response Bart,
| >
| > So do you mean that the "COM_NAME" is a normal public field rather than
a
| > property in your objectdatasoure or the configured dataobject class?
If
| > so, based on my understanding, those datacontrol which define some
XXXField
| > property use reflection to dynamically query the member (of that field
| > name) in the class, and it only support querying Properties rather than
| > field, so if you're using field, I'd suggest you try changing it to
| > property instead.... In addition, if convenient, you can also create
a
| > simplified example of the datasource object you used to us so that we
can
| > have a more detailed view on it...
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| > --------------------
| > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | thread-index: AcX+eBleQO149wnMTKijUodQdPdPVw==
| > | X-WBNR-Posting-Host: 84.195.200.73
| > | From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| > | References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
| > <YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
| > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | Date: Sun, 11 Dec 2005 09:27:02 -0800
| > | Lines: 25
| > | Message-ID: <324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14890
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > |
| > | Hi Kevin,
| > |
| > | The objectdatasource is indeed updating the database.
| > | There is a COM_NAME field(I have it also on other objectdatasource's)
| > | The object datasource is calling a webservice proxy generated via WSE
3.0
| > | When I call the proxy via a winforms client I don't have any problem
| > | updating the data.
| > |
| > | Thanks
| > | Bart
| > |
[quoted text, click to view]
| > |
| > | > Hi,
| > | >
| > | > Based on the error message, are you updating an ObjectDataSource
object
| > to
| > | > tthe data source? is there a property named 'COM_NAME' in the
object?
| > Are
| > | > you doing some COM interop in your code?
| > | >
| > | > Kevin Yu
| > | > =======
| > | > "This posting is provided "AS IS" with no warranties, and confers
no
| > | > rights."
| > | >
| > | >
| > |
| >
| >
|
RE: Could not find a property named in ASP.NET 2.0 stcheng NO[at]SPAM online.microsoft.com
12/14/2005 8:49:24 AM
Thanks for your response.

Sorry that I missed the point that the error occur when you updating it....
well, you can send me that file through the email in my signature(remove
the "online" in it...), You can also attach a simplifed asp.net page code
so that I can also have a look...

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)





--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcX/zfE3tV4zlNrvSh6S4Un3I6NUjA==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
<YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
<324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
<Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
<130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
<sC3KRU8$FHA.1240@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Tue, 13 Dec 2005 02:14:03 -0800
| Lines: 189
| Message-ID: <1CAF192D-FC15-483C-869A-BCCF9A771CAC@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14902
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi Steven, showing the data is no problem. The GetCompany funtion works
fine.
| It is the update that isn't working and producing this error.
|
| Can I send you the proxy class by email?
|
| Thanks
| Bart
|
[quoted text, click to view]
|
| > Hi Bart,
| >
| > Thanks for the followup.
| > Seems a bit strange. Would you try just creating a list (Array) of the
| > objects returned by "GetCompany" method, and directly bind the list to
the
| > GridView control so see whether it can display well? Or If possible you
can
| > simplified the WSDL document and paste to me
| > so that I can create a proxy class locally and test it ....
| >
| > Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| > --------------------
| > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| > | X-WBNR-Posting-Host: 84.195.200.73
| > | From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| > | References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
| > <YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
| > <324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
| > <Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
| > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | Date: Mon, 12 Dec 2005 04:43:01 -0800
| > | Lines: 118
| > | Message-ID: <130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path:
TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > |
| > | Hi Steven,
| > |
| > | below you see my code snipped of the asp.net 2.0 form:
| > |
| > | <asp:FormView ID="FormView1" runat="server"
| > BackColor="LightGoldenrodYellow"
| > | BorderColor="Tan"
| > | BorderWidth="1px" CellPadding="2"
| > DataKeyNames="COM_ID"
| > | DataSourceID="ObjectDataSource1"
| > | ForeColor="Black" Width="300px"
| > | meta:resourcekey="FormView1Resource1">
| > | <EditItemTemplate>
| > | <table style="width: 220px">
| > | <tr>
| > | <asp:TextBox ID="COM_NAMETextBox"
runat="server"
| > | Text='<%# Bind("COM_NAME") %>'
| > | meta:resourcekey="COM_NAMETextBoxResource1"></asp:TextBox></td>
| > | .....
| > | </asp:FormView>
| > |
| > |
| > | ObjectDataSource1 code snipped:
| > |
| > | <asp:ObjectDataSource ID="ObjectDataSource1" runat="server"
| > | DataObjectTypeName="YCommDataSet+COMPANYDataTable"
| > | SelectMethod="GetCompany" TypeName="BusinessProxy"
| > | UpdateMethod="SaveCompany"></asp:ObjectDataSource>
| > |
| > | This is the property COM_NAME generated by the WSE 3.0 tool
wsewsdl3.exe:
| > | public string COM_NAME {
| > | get {
| > | return
((string)(this[this.tableCOMPANY.COM_NAMEColumn]));
| > | }
| > | set {
| > | this[this.tableCOMPANY.COM_NAMEColumn] = value;
| > | }
| > | }
| > |
[quoted text, click to view]
| > |
| > | > Thanks for your response Bart,
| > | >
| > | > So do you mean that the "COM_NAME" is a normal public field rather
than
| > a
| > | > property in your objectdatasoure or the configured dataobject
class?
| > If
| > | > so, based on my understanding, those datacontrol which define some
| > XXXField
| > | > property use reflection to dynamically query the member (of that
field
| > | > name) in the class, and it only support querying Properties rather
than
| > | > field, so if you're using field, I'd suggest you try changing it to
| > | > property instead.... In addition, if convenient, you can also
create
| > a
| > | > simplified example of the datasource object you used to us so that
we
| > can
| > | > have a more detailed view on it...
| > | >
| > | > Thanks,
| > | >
| > | > Steven Cheng
| > | > Microsoft Online Support
| > | >
| > | > Get Secure! www.microsoft.com/security
| > | > (This posting is provided "AS IS", with no warranties, and confers
no
| > | > rights.)
| > | >
| > | >
| > | > --------------------
| > | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
RE: Could not find a property named in ASP.NET 2.0 Bart
12/16/2005 7:04:03 AM
Hi, Steven,

Thanks for clearing this out.
Now I have the problem that a datarow doesn't have a parameterless contructor.
Does it mean that I have to create a class with a property for each field?
Or is there a way to let the wsewsdl3 tool generate it?

Thanks again

[quoted text, click to view]
RE: Could not find a property named in ASP.NET 2.0 stcheng NO[at]SPAM online.microsoft.com
12/16/2005 9:16:33 AM
Hi Bart,

I've had a look into the code you sent me. And I think the problem is the
currently updating model you're using. As for the ASP.NET template
databound controls (GridView, DetailsView......). They can be bound to a
List of data (like DataTable, Array, DataView....). However, when
performing updating or deleting, only single Row(Record) can be passed from
DataBound control to DataSource control, so your the "UpdateMethod" of
your BusinessObject defined in the ObjectDataSource must be a function
which accept a single record object (a DataRow, a object class) rather than
a DataTable or typedDataTAble.....

e.g... we should define a method like:

BusinessProxy.UpdateCompanyTableRow(CompanyTableRow row)

which accept a class instance which has the property that mapped to the
fields in the databound control( GridView or DetailsView...)

rather than BusinessProxy.SaveCompany(CompanyDataTable)

Thus, we can get why the original page always report "can not found
property .... error ", yes? Because it try find a "COM_NAME" field on the
CompanyTable instance which is surely impossible....

If there anything unclear, please feel free to post here.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 179263170
| References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
<YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
<324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
<Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
<130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
<sC3KRU8$FHA.1240@TK2MSFTNGXA02.phx.gbl>
<1CAF192D-FC15-483C-869A-BCCF9A771CAC@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: stcheng@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Wed, 14 Dec 2005 08:49:24 GMT
| Subject: RE: Could not find a property named in ASP.NET 2.0
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| Message-ID: <yXTyMtIAGHA.1996@TK2MSFTNGXA02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| Lines: 233
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14907
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Thanks for your response.
|
| Sorry that I missed the point that the error occur when you updating
it....
| well, you can send me that file through the email in my signature(remove
| the "online" in it...), You can also attach a simplifed asp.net page code
| so that I can also have a look...
|
| Regards,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
|
| --------------------
| | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | thread-index: AcX/zfE3tV4zlNrvSh6S4Un3I6NUjA==
| | X-WBNR-Posting-Host: 84.195.200.73
| | From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| | References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
| <YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
| <324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
| <Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
| <130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
| <sC3KRU8$FHA.1240@TK2MSFTNGXA02.phx.gbl>
| | Subject: RE: Could not find a property named in ASP.NET 2.0
| | Date: Tue, 13 Dec 2005 02:14:03 -0800
| | Lines: 189
| | Message-ID: <1CAF192D-FC15-483C-869A-BCCF9A771CAC@microsoft.com>
| | MIME-Version: 1.0
| | Content-Type: text/plain;
| | charset="Utf-8"
| | Content-Transfer-Encoding: 7bit
| | X-Newsreader: Microsoft CDO for Windows 2000
| | Content-Class: urn:content-classes:message
| | Importance: normal
| | Priority: normal
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet.datagridcontrol:14902
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| |
| | Hi Steven, showing the data is no problem. The GetCompany funtion works
| fine.
| | It is the update that isn't working and producing this error.
| |
| | Can I send you the proxy class by email?
| |
| | Thanks
| | Bart
| |
[quoted text, click to view]
| |
| | > Hi Bart,
| | >
| | > Thanks for the followup.
| | > Seems a bit strange. Would you try just creating a list (Array) of
the
| | > objects returned by "GetCompany" method, and directly bind the list
to
| the
| | > GridView control so see whether it can display well? Or If possible
you
| can
| | > simplified the WSDL document and paste to me
| | > so that I can create a proxy class locally and test it ....
| | >
| | > Thanks,
| | >
| | > Steven Cheng
| | > Microsoft Online Support
| | >
| | > Get Secure! www.microsoft.com/security
| | > (This posting is provided "AS IS", with no warranties, and confers no
| | > rights.)
| | >
| | > --------------------
| | > | Thread-Topic: Could not find a property named in ASP.NET 2.0
| | > | thread-index: AcX/GZatTL6SAATwQCaZkYNQJCiLmg==
| | > | X-WBNR-Posting-Host: 84.195.200.73
| | > | From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| | > | References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
| | > <YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
| | > <324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
| | > <Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
| | > | Subject: RE: Could not find a property named in ASP.NET 2.0
| | > | Date: Mon, 12 Dec 2005 04:43:01 -0800
| | > | Lines: 118
| | > | Message-ID: <130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
| | > | MIME-Version: 1.0
| | > | Content-Type: text/plain;
| | > | charset="Utf-8"
| | > | Content-Transfer-Encoding: 7bit
| | > | X-Newsreader: Microsoft CDO for Windows 2000
| | > | Content-Class: urn:content-classes:message
| | > | Importance: normal
| | > | Priority: normal
| | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| | > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| | > | Path:
| TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| | > | Xref: TK2MSFTNGXA02.phx.gbl
| | > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14893
| | > | X-Tomcat-NG:
microsoft.public.dotnet.framework.aspnet.datagridcontrol
| | > |
| | > | Hi Steven,
| | > |
| | > | below you see my code snipped of the asp.net 2.0 form:
RE: Could not find a property named in ASP.NET 2.0 stcheng NO[at]SPAM online.microsoft.com
12/19/2005 3:37:33 AM
Thanks for your reply Bart,

I think we have to manually do some modification in the generated proxy
classes's code. So far the wsewsdl3.exe will only help generate a normal
standard proxy class and there has few options for defining the detailed
class's code style, etc.....
Also, as for ObjectDataSource, it dosn't matter where the class come or how
does it get generated, but require it to meet the requirements (like the
default constructor needed....).

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: Could not find a property named in ASP.NET 2.0
| thread-index: AcYCUfO8K4g8SnV9SUqH85mUFewgLA==
| X-WBNR-Posting-Host: 84.195.200.73
| From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
<YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
<324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
<Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
<130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
<sC3KRU8$FHA.1240@TK2MSFTNGXA02.phx.gbl>
<1CAF192D-FC15-483C-869A-BCCF9A771CAC@microsoft.com>
<yXTyMtIAGHA.1996@TK2MSFTNGXA02.phx.gbl>
<2RmjvFiAGHA.1504@TK2MSFTNGXA02.phx.gbl>
| Subject: RE: Could not find a property named in ASP.NET 2.0
| Date: Fri, 16 Dec 2005 07:04:03 -0800
| Lines: 311
| Message-ID: <D4893FB7-79D7-42EA-998B-CBC3D9DE948E@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet.datagridcontrol:14928
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
|
| Hi, Steven,
|
| Thanks for clearing this out.
| Now I have the problem that a datarow doesn't have a parameterless
contructor.
| Does it mean that I have to create a class with a property for each field?
| Or is there a way to let the wsewsdl3 tool generate it?
|
| Thanks again
|
[quoted text, click to view]
|
| > Hi Bart,
| >
| > I've had a look into the code you sent me. And I think the problem is
the
| > currently updating model you're using. As for the ASP.NET template
| > databound controls (GridView, DetailsView......). They can be bound to
a
| > List of data (like DataTable, Array, DataView....). However, when
| > performing updating or deleting, only single Row(Record) can be passed
from
| > DataBound control to DataSource control, so your the "UpdateMethod" of
| > your BusinessObject defined in the ObjectDataSource must be a function
| > which accept a single record object (a DataRow, a object class) rather
than
| > a DataTable or typedDataTAble.....
| >
| > e.g... we should define a method like:
| >
| > BusinessProxy.UpdateCompanyTableRow(CompanyTableRow row)
| >
| > which accept a class instance which has the property that mapped to the
| > fields in the databound control( GridView or DetailsView...)
| >
| > rather than BusinessProxy.SaveCompany(CompanyDataTable)
| >
| > Thus, we can get why the original page always report "can not found
| > property .... error ", yes? Because it try find a "COM_NAME" field on
the
| > CompanyTable instance which is surely impossible....
| >
| > If there anything unclear, please feel free to post here.
| >
| > Regards,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| > --------------------
| > | X-Tomcat-ID: 179263170
| > | References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
| > <YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
| > <324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
| > <Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
| > <130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
| > <sC3KRU8$FHA.1240@TK2MSFTNGXA02.phx.gbl>
| > <1CAF192D-FC15-483C-869A-BCCF9A771CAC@microsoft.com>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain
| > | Content-Transfer-Encoding: 7bit
| > | From: stcheng@online.microsoft.com (Steven Cheng[MSFT])
| > | Organization: Microsoft
| > | Date: Wed, 14 Dec 2005 08:49:24 GMT
| > | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | Message-ID: <yXTyMtIAGHA.1996@TK2MSFTNGXA02.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet.datagridcontrol
| > | Lines: 233
| > | Path: TK2MSFTNGXA02.phx.gbl
| > | Xref: TK2MSFTNGXA02.phx.gbl
| > microsoft.public.dotnet.framework.aspnet.datagridcontrol:14907
| > | NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
| > |
| > | Thanks for your response.
| > |
| > | Sorry that I missed the point that the error occur when you updating
| > it....
| > | well, you can send me that file through the email in my
signature(remove
| > | the "online" in it...), You can also attach a simplifed asp.net page
code
| > | so that I can also have a look...
| > |
| > | Regards,
| > |
| > | Steven Cheng
| > | Microsoft Online Support
| > |
| > | Get Secure! www.microsoft.com/security
| > | (This posting is provided "AS IS", with no warranties, and confers no
| > | rights.)
| > |
| > |
| > |
| > |
| > |
| > | --------------------
| > | | Thread-Topic: Could not find a property named in ASP.NET 2.0
| > | | thread-index: AcX/zfE3tV4zlNrvSh6S4Un3I6NUjA==
| > | | X-WBNR-Posting-Host: 84.195.200.73
| > | | From: "=?Utf-8?B?QmFydA==?=" <bartVDA@community.nospam>
| > | | References: <32E5E44E-815A-404B-9AEC-EB23A931CCC1@microsoft.com>
| > | <YKSOboT$FHA.3764@TK2MSFTNGXA02.phx.gbl>
| > | <324A46A6-8F64-47DE-AFC1-E6B285B14618@microsoft.com>
| > | <Tfsfm5w$FHA.1236@TK2MSFTNGXA02.phx.gbl>
| > | <130BB33E-C741-4D45-9EF6-53413AAB6F70@microsoft.com>
| > | <sC3KRU8$FHA.1240@TK2MSFTNGXA02.phx.gbl>
| > | | Subject: RE: Could not find a property named in ASP.NET 2.0
| > | | Date: Tue, 13 Dec 2005 02:14:03 -0800
| > | | Lines: 189
| > | | Message-ID: <1CAF192D-FC15-483C-869A-BCCF9A771CAC@microsoft.com>
| > | | MIME-Version: 1.0
| > | | Content-Type: text/plain;
| > | | charset="Utf-8"
| > | | Content-Transfer-Encoding: 7bit
| > | | X-Newsreader: Microsoft CDO for Windows 2000
| > | | Content-Class: urn:content-classes:message
| > | | Importance: normal
| > | | Priority: normal
AddThis Social Bookmark Button