Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > Visual Studio 2005
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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


Reply With Quote
  #2 (permalink)  
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
Reply With Quote
  #3 (permalink)  
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

Reply With Quote
  #4 (permalink)  
Old May 30th, 2007, 06:22 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 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.
Reply With Quote
  #5 (permalink)  
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
Reply With Quote
  #6 (permalink)  
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

Reply With Quote
  #7 (permalink)  
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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:28 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.