Wrox Programmer Forums
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 15th, 2007, 04:39 AM
Authorized User
 
Join Date: Jan 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dataset in vb.net

Hi,

I've done this code in c# in asp.net 1.x. same thing i want to do in asp.net 2.0 in vb.net.

im getting an error in vb.net .
dsGrd = (dsGrd) Session["GridDataSet"];

how do i type cast the same to vb.net.my code in vb was,
  dsorders = CType(Session("GridDataSet"),dsorders) and error was the dsorders type was not defined which is inside the ctype .can somebody help me.


Regards,
Tasnim.


 
Old April 17th, 2007, 06:46 AM
Authorized User
 
Join Date: Sep 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

In VB.NET it is
dsGrd = CType(Session["GridDataSet"], DataSet)

and in C# .NET it is
dsGrd = (DataSet)(Session["GridDataSet"])

Greetz,

Geert

http://geertverhoeven.blogspot.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Writing to Excel from a dataset with VB.Net ruairi VB.NET 2002/2003 Basics 5 July 27th, 2009 12:07 PM
vb.net 2008 re: VB.NET databases book bigbearjeff VB.NET 0 June 2nd, 2008 01:22 PM
Dataset in vb.net thas123 .NET Framework 2.0 0 January 15th, 2007 04:35 AM
VB.Net question on Windows VB.Net datagrids dmsousa VS.NET 2002/2003 1 January 19th, 2005 02:45 PM
vb.net 2002 - vb.net 2003 book metalaaron Wrox Book Feedback 0 August 2nd, 2003 10:46 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.