ASP.NET vs VB.NET - DataView

A

Antoine

One more question - why is it that the dataview samples all seem to be in
ASP.NET and it only works in this? Surely they should port between both
platforms?

I might add, work fine in ASP.NET - given import namespace = "system.data"
of course.

But when I come to trying it out in VB.NET windows app, even with IMPORTS
system.data it does not at all like the DATAVIEW declarations.

Any ideas for a novice like me. Very much thanks for reading my problem

Regards,
Ant
 
C

Cor Ligthert

Antoine,

The dataview is standard used in a windowform application with a lot of
samples about that, are you not mixing this up with the viewstate which is
of course not in a windowform because there is not any need for it?

Cor
 
A

Antoine

Cor Ligthert said:
Antoine,

The dataview is standard used in a windowform application with a lot of
samples about that, are you not mixing this up with the viewstate which is
of course not in a windowform because there is not any need for it?

Cor

It is the DATAVIEW I think I am having problem with based onthe MSDN sample.

http://msdn.microsoft.com/library/d...ef/html/frlrfsystemdatadataviewclasstopic.asp

When I put the code on a form class, it highlights a problem on two lines
Dim firstView As dataview = New dataview(myTable)
Dim secondView As dataview = New dataview(myTable)

the first dataview entry is highlighted - the debug is "type expected".

As the ASP.NET version works fine and seems dependant on import namespace
system.data , for using it on VB windows app tried Imports system.data but
that doesnt help. Just wondered why the technique does not work directly on
VB.NET windows app, where am I going wrong I wonder?

Thanks a bundle

Ant
 
A

Antoine

THIS is tried, and with just a couple of edits, it works. (Had to dim the
datatable in the declarations for dtVBreg).

However, the MSDN one surely didn't yesterday at least.
I tried the code now, and it does.
I think this comes down to me being a newb and something really, really,
dumb.

I just pasted the code here (at work) and its fine even without any datagrid
controls on the page on a spanking new empty project (completely as is). I
have NO idea why the same image doesn't produce the same results at home. I
might try again and see what happens next week.

Oh well :blush:)
Sorry about that but thanks for the tip and sample.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top