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

Discussion in 'ASP .Net' started by ShailKumar, Sep 10, 2011.

  1. ShailKumar

    ShailKumar Guest

    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
     
    ShailKumar, Sep 10, 2011
    #1
    1. Advertising

  2. ShailKumar

    Brian Cryer Guest

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

    "ShailKumar" <> wrote in message
    news:...
    > 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
     
    Brian Cryer, Sep 13, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    5,964
    =?Utf-8?B?TWljaGFlbCBFIEJhbHRpYw==?=
    Mar 16, 2006
  2. Benny Dein
    Replies:
    0
    Views:
    3,470
    Benny Dein
    Mar 20, 2006
  3. =?Utf-8?B?V2ViRGV2Mg==?=
    Replies:
    0
    Views:
    2,757
    =?Utf-8?B?V2ViRGV2Mg==?=
    Aug 24, 2006
  4. Replies:
    0
    Views:
    659
  5. Replies:
    4
    Views:
    1,326
Loading...

Share This Page