Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Visual Studio 2005 For discussing Visual Studio 2005. Please post code questions about a specific language (C#, VB, ASP.NET, etc) in the correct language forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Studio 2005 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 May 30th, 2007, 04:21 AM
Authorized User
 
Join Date: May 2004
Location: chennai, tamil nad, India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default Include Namespace in .aspx.vb??

hi all,
I am new to .NET , Could any please let me know how Include NameSpace in VB codebehind because
If i Use Imports system.data.sqlclient i seems to error in the code ???

Any help in this

Mike D


 
Old May 30th, 2007, 05:18 AM
Registered User
 
Join Date: Apr 2007
Location: Gurgaon, Haryana, Guatemala.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Mike,
       insert your namespace( imports system.data.sqlclient) above the form class.

Thanks
Ajay kumar
ajay.kumar@docsgroup.com




ajay
 
Old May 30th, 2007, 06:15 AM
Authorized User
 
Join Date: May 2004
Location: chennai, tamil nad, India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ajay,
Even if i insert the imports system.data.sqlclient above the class also it says the same

Mike

 
Old May 30th, 2007, 06:22 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Mike,

You'll need to add a reference to the System.Data assembly in your project for these namespace to become available.

Right-click your project, choose Add Reference and then select System.Data on the .NET tab.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old May 31st, 2007, 12:04 AM
Registered User
 
Join Date: Apr 2007
Location: Gurgaon, Haryana, Guatemala.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Mike,
             Send me your code through which i can debug the code whatever your are using.


Thanks
Ajay
ajay.kumar@docsgroup.com



ajay
 
Old June 1st, 2007, 04:23 AM
Authorized User
 
Join Date: May 2004
Location: chennai, tamil nad, India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Imar

 
Old June 1st, 2007, 04:31 AM
Authorized User
 
Join Date: May 2004
Location: chennai, tamil nad, India.
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ajay,
 i Just open VS 2005 for ASP.NET WEB APPLICATION and chose the VB.NET as code behind

In the default.aspx.vb file What i did is - like just want to Create the connection (SQLSERVER) so above the class name i wrote like
Imports system.Data.SQLClient then it throws an error (Underlined)
So after that i called the full namespace where ever required it works fine but i need to know the reason why it went wrong when i import.
Now i got the answer from IMAR and thanks to you also for the quick response.

Mike.D





Similar Threads
Thread Thread Starter Forum Replies Last Post
how to include .js file in .aspx page shanwaj ASP.NET 2.0 Basics 13 March 11th, 2008 07:36 AM
Dynamically include an aspx page ndkicha_1981 General .NET 0 October 19th, 2007 03:12 AM
problem defining namespace for .aspx page pratik28 ASP.NET 2.0 Basics 0 October 26th, 2006 06:43 AM
HelpX_x; How do I include a variable file in aspx? CSharp1314 Classic ASP Basics 16 May 5th, 2004 06:15 PM
Include file within aspx jieli1001 ASP.NET 1.0 and 1.1 Professional 2 July 29th, 2003 04:32 AM





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