PC Review


Reply
Thread Tools Rate Thread

CS0246: The type or namespace name 'sconnection' could not be found(are you missing a using directive or an assembly reference?)

 
 
ShailKumar
Guest
Posts: n/a
 
      10th Sep 2011
Hi!
I have a website in asp.net with c#. It works fine
on the Visual Studio but when I run on Windows 7 Local then i get
error.

CS0246: The type or namespace name 'sconnection' could not be found
(are you missing a using directive or an assembly reference?)

Line 15: public partial class _Default : System.Web.UI.Page
Line 16: {
Line 17: sconnection c = new sconnection();
Line 18: protected void Page_Load(object sender, EventArgs e)
Line 19: {

sconnection is my sconnection.cs file. i create this for sql
connection in App_code folder.

Please help me.
Thanks o
Shailendra Kumar
 
Reply With Quote
 
 
 
 
Brian Cryer
Guest
Posts: n/a
 
      13th Sep 2011
"ShailKumar" <(E-Mail Removed)> wrote in message
news:1f5555ce-cf7f-45ed-ac81-(E-Mail Removed)...
> Hi!
> I have a website in asp.net with c#. It works fine
> on the Visual Studio but when I run on Windows 7 Local then i get
> error.
>
> CS0246: The type or namespace name 'sconnection' could not be found
> (are you missing a using directive or an assembly reference?)
>
> Line 15: public partial class _Default : System.Web.UI.Page
> Line 16: {
> Line 17: sconnection c = new sconnection();
> Line 18: protected void Page_Load(object sender, EventArgs e)
> Line 19: {
>
> sconnection is my sconnection.cs file. i create this for sql
> connection in App_code folder.
>
> Please help me.
> Thanks o


How did you deploy this site to the Windows 7 box? It sounds to me like you
have n't copied everything.

Assuming Visual Studio 2010 then right click on your website project and
select "Publish Web Site", and then once complete, copy EVERYTHING including
sub-folders from the target folder to the Windows 7 box.

Hope this helps.
--
Brian Cryer
http://www.cryer.co.uk/brian


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiler Error Message: CS0246: The type or namespace name could not be found (are you missing a using directive or an assembly reference?) infinetinc@gmail.com Microsoft ASP .NET 4 26th Dec 2006 04:46 PM
The type or namespace name 'IssueDataSetTableAdapters' could not be found (are you missing a using directive or an assembly reference?) tarscher@gmail.com Microsoft ASP .NET 0 22nd Sep 2006 09:41 AM
ERROR CS0234: The type or namespace name 'DataAccessHelper' does not exist in the namespace 'BCC' (are you missing an assembly reference?) li.eddie@gmail.com Microsoft ASP .NET 0 6th Jan 2006 11:31 AM
The type or namespace name 'MyClass' could not be found (are you missing a using directive or an assembly reference?) carqs123 Microsoft C# .NET 4 26th Dec 2005 03:14 AM
The type or namespace name 'Windows' does not exist in the class or namespace 'System' (are you missing an assembly reference?) =?Utf-8?B?UmF5?= Microsoft Dot NET 1 7th Apr 2004 10:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:46 AM.