CS0246: The type or namespace name 'sconnection' could not be found(are you missing a using directiv

S

ShailKumar

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
 
B

Brian Cryer

ShailKumar said:
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.
 

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

Members online

Forum statistics

Threads
473,708
Messages
2,569,347
Members
44,654
Latest member
7Jhamal74

Latest Threads

Top