473,378 Members | 1,099 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Why do I have to qualify 'DataRowView' with System.Data?

I am getting the error below when I try to use DataRowView in my aspx page.
I am using the System.Data in my code behind. I even tried importing
system.Data in the aspx. I have to qualify it with System.Data to get it
going. Why is that?

Error Message:
The type or namespace name 'DataRowView' could not be found (are you
missing a using directive or an assembly reference?)

Karim
Nov 17 '05 #1
5 5154
You will have to post come code.

Are you using another namespace that has a DataRowView?
bill
"karim" <ka*******@11yahoo11.com> wrote in message
news:a9******************************@free.teranew s.com...
I am getting the error below when I try to use DataRowView in my aspx page. I am using the System.Data in my code behind. I even tried importing
system.Data in the aspx. I have to qualify it with System.Data to get it
going. Why is that?

Error Message:
The type or namespace name 'DataRowView' could not be found (are you
missing a using directive or an assembly reference?)

Karim

Nov 17 '05 #2

On Thu, 10 Jul 2003 14:09:59 -0500, William F. Robertson, Jr. wrote:
You will have to post come code.

Are you using another namespace that has a DataRowView?
bill
This is line from the aspx file:

<asp:TextBox id=txtCarName Width="340px" runat="server" text='<%# ( (
System.Data.DataRowView ) Container.DataItem ) [ "AutoName" ]
%>'></asp:TextBox>




"karim" <ka*******@11yahoo11.com> wrote in message
news:a9******************************@free.teranew s.com...
I am getting the error below when I try to use DataRowView in my aspx

page.
I am using the System.Data in my code behind. I even tried importing
system.Data in the aspx. I have to qualify it with System.Data to get it
going. Why is that?

Error Message:
The type or namespace name 'DataRowView' could not be found (are you
missing a using directive or an assembly reference?)

Karim

Nov 17 '05 #3
Yes, you have to do it that way. There is no using for an aspx page. When
a page is compiled all the "using" goes away and is replaced with the full
name of all the objects.

The using is just to help with typing and maintaining more readable code.

There is no other way around it. (That I can think of)

HTH,

bill
"karim" <ka*******@11yahoo11.com> wrote in message
news:07******************************@free.teranew s.com...

On Thu, 10 Jul 2003 14:09:59 -0500, William F. Robertson, Jr. wrote:
You will have to post come code.

Are you using another namespace that has a DataRowView?
bill


This is line from the aspx file:

<asp:TextBox id=txtCarName Width="340px" runat="server" text='<%# ( (
System.Data.DataRowView ) Container.DataItem ) [ "AutoName" ]
%>'></asp:TextBox>




"karim" <ka*******@11yahoo11.com> wrote in message
news:a9******************************@free.teranew s.com...
I am getting the error below when I try to use DataRowView in my aspx

page.
I am using the System.Data in my code behind. I even tried importing
system.Data in the aspx. I have to qualify it with System.Data to get it going. Why is that?

Error Message:
The type or namespace name 'DataRowView' could not be found (are you
missing a using directive or an assembly reference?)

Karim

Nov 17 '05 #4

"William F. Robertson, Jr." <wf*********@kpmg.com> wrote in message
news:e6*************@tk2msftngp13.phx.gbl...
Yes, you have to do it that way. There is no using for an aspx page. When a page is compiled all the "using" goes away and is replaced with the full
name of all the objects.

You should be able to use the

<%@ Import Namespace="System.Data" %>

directive to declare that the page is 'using' (in C# parlance) the
System.Data namespace.

The using is just to help with typing and maintaining more readable code.

There is no other way around it. (That I can think of)

HTH,

bill
"karim" <ka*******@11yahoo11.com> wrote in message
news:07******************************@free.teranew s.com...

On Thu, 10 Jul 2003 14:09:59 -0500, William F. Robertson, Jr. wrote:
You will have to post come code.

Are you using another namespace that has a DataRowView?
bill


This is line from the aspx file:

<asp:TextBox id=txtCarName Width="340px" runat="server" text='<%# ( (
System.Data.DataRowView ) Container.DataItem ) [ "AutoName" ]
%>'></asp:TextBox>




"karim" <ka*******@11yahoo11.com> wrote in message
news:a9******************************@free.teranew s.com...
> I am getting the error below when I try to use DataRowView in my aspx
page.
> I am using the System.Data in my code behind. I even tried importing
> system.Data in the aspx. I have to qualify it with System.Data to get it> going. Why is that?
>
> Error Message:
> The type or namespace name 'DataRowView' could not be found (are you
> missing a using directive or an assembly reference?)
>
> Karim



--
MikeB
Nov 17 '05 #5
You DON"t have to do it that way.

import the system.Data namespace in your code
or set it as a project-level import in project properties.
"karim" <ka*******@11yahoo11.com> wrote in message
news:a9******************************@free.teranew s.com...
I am getting the error below when I try to use DataRowView in my aspx page. I am using the System.Data in my code behind. I even tried importing
system.Data in the aspx. I have to qualify it with System.Data to get it
going. Why is that?

Error Message:
The type or namespace name 'DataRowView' could not be found (are you
missing a using directive or an assembly reference?)

Karim

Nov 17 '05 #6

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

Similar topics

1
by: GeraldBauer | last post by:
I am experiencing some weird behaviors with the listbox and dataview. Here is a boiled down code snippet of what I am trying to do. <snippet> string MENUID = "MenuId" , ITEM = "Item" ,...
2
by: kscdavefl | last post by:
I am trying to fill a datalist with table names from an Oracle database. The program works fine using the following code: private void GetTables() { // open a database connection string con...
2
by: Dinky | last post by:
Hi all, I have got this error when using "DataRowView". Do we need to put reference to this class somewhere? Or Could you please point out What is wrong with this HTML? Thanks ...
2
by: etropic | last post by:
I am trying to bind two tables to two different list boxes Ther tables are working as I use them on another page wth no problems The code is as follows... private void Page_Load(object...
0
by: MS | last post by:
I am very new to asp.net. Please help me in resolving the error: DataBinder.Eval: 'System.Data.DataRowView' does not contain a property with the name RENEW_EXIST. I get the above error with the...
2
by: Grigs | last post by:
I have a C# Web Service that some of the methods (ones that return integers) work and some do not (the ones that return a DataView. Here is some code in the WebService that is giving me the...
3
by: needin4mation | last post by:
In this code: protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { DataRowView rowView =...
3
by: Jerry | last post by:
Hi I have a combo box that is populated by an ole db connection to a ms access table (Valuewave). The column that is used in the table is called waves. The combo box is populated with the...
1
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, DataRowView drv = (DataRowView)((GridViewRow)lbl.NamingContainer).DataItem; i found this snippet on the net which works correctly in its context. It's datasource is coming from a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.