473,473 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

public member not found error

Hello all. I really hope someone can help me solve this error:

I am getting the following error:

Public member 'PlanID' on type 'DataRowView' not found.

Here is the relevant code:

<ItemTemplate>
<tr>
<td background="images/ltMiddle.jpg" style="background-repeat:repeat-y;
background-position:top right;"</td>
<td bgcolor="e1e1e1" style="background-repeat:repeat-y;
background-position:bottom;"</td>
<td colspan="2" bgcolor="e1e1e1" style="background-repeat:repeat-y;
background-position:bottom;">
<asp:LinkButton id="Group1" CommandName="<%# container.DataItem().PlanID%>"
style="Z-INDEX: 101; LEFT: 328px; POSITION: absolute; TOP: 128px"
runat="server">LinkButton</asp:LinkButton>
</td>
<td background="images/rtMiddle.jpg" style="background-repeat:repeat-y;
background-position:top left;"</td>
</tr>
</ItemTemplate>

The code is part of a Repeater control. The data is bound to the control in
the load procedure. Here is that code:

myConn.Open()

SelCmd.CommandText = "select planname,planid from floorplans
where squareft < 2000 order by planname ASC"
SelCmd.Connection = myConn
myCommand.SelectCommand = SelCmd

myCommand.Fill(FloorplansDs, "Under2kName")

FirstGroup.DataSource =
FloorplansDs.Tables("Under2kName").DefaultView
DataBind()

myCommand.Dispose()
myConn.Close()
Please help! :)
Mar 9 '07 #1
1 1629
On Thu, 8 Mar 2007 18:01:08 -0800, Erica wrote:
Hello all. I really hope someone can help me solve this error:

I am getting the following error:

Public member 'PlanID' on type 'DataRowView' not found.

Here is the relevant code:

<ItemTemplate>
<tr>
<td background="images/ltMiddle.jpg" style="background-repeat:repeat-y;
background-position:top right;"</td>
<td bgcolor="e1e1e1" style="background-repeat:repeat-y;
background-position:bottom;"</td>
<td colspan="2" bgcolor="e1e1e1" style="background-repeat:repeat-y;
background-position:bottom;">
<asp:LinkButton id="Group1" CommandName="<%# container.DataItem().PlanID%>"
style="Z-INDEX: 101; LEFT: 328px; POSITION: absolute; TOP: 128px"
runat="server">LinkButton</asp:LinkButton>
</td>
<td background="images/rtMiddle.jpg" style="background-repeat:repeat-y;
background-position:top left;"</td>
</tr>
</ItemTemplate>

The code is part of a Repeater control. The data is bound to the control in
the load procedure. Here is that code:

myConn.Open()

SelCmd.CommandText = "select planname,planid from floorplans
where squareft < 2000 order by planname ASC"
SelCmd.Connection = myConn
myCommand.SelectCommand = SelCmd

myCommand.Fill(FloorplansDs, "Under2kName")

FirstGroup.DataSource =
FloorplansDs.Tables("Under2kName").DefaultView
DataBind()

myCommand.Dispose()
myConn.Close()

Please help! :)
Looks like your syntax is a bit off.

Try this instead

DataBinder.Eval(Container.DataItem,"PlanID")
--
Bits.Bytes
http://bytes.thinkersroom.com
Mar 10 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: qazmlp | last post by:
class base { // other members public: virtual ~base() { } virtual void virtualMethod1()=0 ; virtual void virtualMethod2()=0 ; virtual void virtualMethod3()=0 ;
18
by: Janaka | last post by:
I'm having a discussion with my colleagues here on good programming standards. One thing we haven't agreed on is the use of properties in classes vs using member variables. Now everyone knows...
5
by: rettigcd | last post by:
I have several classes that all have the same static member: class A{ public static string Table = "TableA"; } class B{ public static string Table = "TableB"; }
1
by: timbobd | last post by:
I have encountered a situation that I don't understand. When I call a sub of Friend scope (in an object with Friend scope), I am getting an error "Public member 'subname' not found in type...
1
by: tshad | last post by:
I have a collection class(exChain), for my Exception log which is getting the following error: *************************************************************************** No default member found...
4
by: Bugs | last post by:
Hi, I wonder if anyone can help me out. I'm building a vb.net application that has a form with a panel that contains several other sub forms (as a collection of controls). What I'm wanting to...
1
by: =?Utf-8?B?RXJpY2E=?= | last post by:
Hello all. I really hope someone can help me solve this error: I am getting the following error: Public member 'PlanID' on type 'DataRowView' not found. Here is the relevant code: ...
9
by: Christopher | last post by:
Code compiles, but the string evaluates to NULL in debugger. Using gcc 3.1.1. Did I not initialize the string properly or is this a compiler bug? // some.h #include <string> namespace ns {
8
by: Sep410 | last post by:
Hi all, Here is the code that I have: For h = 2 To dt.Rows.Count - 1 For j = 0 To 11 Excel.Cells(h, k).value = (dt.Rows(h).Item(j).Value).ToString ...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.