Board index » Web Programming » Why do I have to qualify 'DataRowView' with System.Data?
|
kolunarayan
|
|
kolunarayan
|
Why do I have to qualify 'DataRowView' with System.Data?
Web Programming238
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 - |
| William
Registered User |
Thu Jul 10 14:09:59 CDT 2003
Re:Why do I have to qualify 'DataRowView' with System.Data?
You will have to post come code.
Are you using another namespace that has a DataRowView? bill "karim" <karim3411@11yahoo11.com>wrote in message QuoteI am getting the error below when I try to use DataRowView in my aspx - |
| karim
Registered User |
Thu Jul 10 15:38:32 CDT 2003
Re:Why do I have to qualify 'DataRowView' with System.Data?On Thu, 10 Jul 2003 14:09:59 -0500, William F. Robertson, Jr. wrote: QuoteYou will have to post come code. <asp:TextBox id=txtCarName Width="340px" runat="server" text='<%# ( ( System.Data.DataRowView ) Container.DataItem ) [ "AutoName" ] %>'></asp:TextBox> Quote
|
| William
Registered User |
Thu Jul 10 15:38:22 CDT 2003
Re:Why do I have to qualify 'DataRowView' with System.Data?
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" <karim3411@11yahoo11.com>wrote in message Quote
- |
| MikeB
Registered User |
Thu Jul 10 16:52:38 CDT 2003
Re:Why do I have to qualify 'DataRowView' with System.Data?"William F. Robertson, Jr." <wfrobertson@kpmg.com>wrote in message QuoteYes, you have to do it that way. There is no using for an aspx page. <%@ Import Namespace="System.Data" %> directive to declare that the page is 'using' (in C# parlance) the System.Data namespace. QuoteThe using is just to help with typing and maintaining more readable code. MikeB - |
| David
Registered User |
Fri Jul 11 14:12:39 CDT 2003
Re:Why do I have to qualify 'DataRowView' with System.Data?
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" <karim3411@11yahoo11.com>wrote in message QuoteI am getting the error below when I try to use DataRowView in my aspx - |
