Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / November 2006

Tip: Looking for answers? Try searching our database.

How access other project classes

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sala - 23 Nov 2006 11:47 GMT
Hi experts!

      I have two projects ...

so First project cs code like this,

using System;
using System.Collections;
using System.Configuration;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
using System.IO;
using GotDotNet.XInclude;
using com.kikudjiro;
using EwaoListingCommon;

namespace Cititown
{
    /// <summary>
    /// Summary description for Compose.
    /// </summary>
    public class Compose : CommonPage
    {
        protected System.Web.UI.HtmlControls.HtmlInputHidden hAction;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPage;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPagesCount;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hOrderField;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hOrderDir;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hCatID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hSubCatID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hListerID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hType;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPostingID;

        private void Page_Load ( object sender, EventArgs e )
        {
            bool bFileRemoved = false;
            bool bCantSaveAttachment = false;
            bool bNoSpace = false;
                                }
               ]
}

Second project code like this,

using System;
using System.Collections;
using System.Configuration;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
using System.IO;
using GotDotNet.XInclude;
using com.kikudjiro;
using EwaoListingCommon;

namespace Cititown.myemails
{
    /// <summary>
    /// Summary description for Compose.
    /// </summary>
    public class ListingComposeGraphic : XmlPage
    {
        protected System.Web.UI.HtmlControls.HtmlInputHidden hAction;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPage;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPagesCount;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hOrderField;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hOrderDir;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hCatID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hSubCatID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hListerID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hType;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPostingID;

        private void Page_Load ( object sender, EventArgs e )
        {
            bool bFileRemoved = false;
            bool bCantSaveAttachment = false;
            bool bNoSpace = false;
                               }
                }
}

If I am using like this

using System;
using System.Collections;
using System.Configuration;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using System.Xml.XPath;
using System.Xml.Xsl;
using System.IO;
using GotDotNet.XInclude;
using com.kikudjiro;
using EwaoListingCommon;

namespace Cititown.myemails
{
    /// <summary>
    /// Summary description for Compose.
    /// </summary>
    public class ListingComposeGraphic : XmlPage  , CommonPage ( I add
here! )
    {
        protected System.Web.UI.HtmlControls.HtmlInputHidden hAction;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPage;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPagesCount;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hOrderField;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hOrderDir;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hCatID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hSubCatID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hListerID;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hType;
        protected System.Web.UI.HtmlControls.HtmlInputHidden hPostingID;

        private void Page_Load ( object sender, EventArgs e )
        {
            bool bFileRemoved = false;
            bool bCantSaveAttachment = false;
            bool bNoSpace = false;
                              }
             }
}
I got error message pls help me soon
SirMike - 23 Nov 2006 11:50 GMT
Dnia 23 Nov 2006 03:47:13 -0800, Sala napisał(a):

> I got error message

Very expressive :)

Signature

SirMike - http://www.sirmike.org

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. - Bjarne Stroustrup

Sala - 23 Nov 2006 12:02 GMT
Pls anyone tell me ... Pls read this msg fully and reply me soon

On Nov 23, 4:50 pm, SirMike <sirm...@FUCKSPAMMERSpoczta.onet.pl>
wrote:
> Dnia 23 Nov 2006 03:47:13 -0800, Sala napisa³(a):
>
[quoted text clipped - 5 lines]
> C makes it easy to shoot yourself in the foot; C++ makes it harder, but
> when you do, it blows away your whole leg. - Bjarne Stroustrup
garyusenet@myway.com - 23 Nov 2006 12:05 GMT
Give the exact error message as the previous poster intimated ;p

> Pls anyone tell me ... Pls read this msg fully and reply me soon
>
[quoted text clipped - 9 lines]
> > C makes it easy to shoot yourself in the foot; C++ makes it harder, but
> > when you do, it blows away your whole leg. - Bjarne Stroustrup
Sala - 23 Nov 2006 12:17 GMT
Hi experts!

      I have two projects ...

so First project cs code like this,
===========================

using System;
using EwaoListingCommon;

namespace Cititown
{
       /// <summary>
       /// Summary description for Compose.
       /// </summary>
       public class Compose : CommonPage
                                               // SEE HERE
       {
               protected System.Web.UI.HtmlControls.HtmlInputHidden
hPostingID;

               private void Page_Load ( object sender, EventArgs e )
               {
                       bool bFileRemoved = false;
              }
      }
}

Second project code like this,
======================

using System;
using EwaoListingCommon;

namespace Cititown.myemails
{
       /// <summary>
       /// Summary description for Compose.
       /// </summary>
       public class ListingComposeGraphic : XmlPage
                                                              // SEE
HERE
       {
               protected System.Web.UI.HtmlControls.HtmlInputHidden
hAction;

               private void Page_Load ( object sender, EventArgs e )
               {
                       bool bFileRemoved = false;
                }
        }
}

If I am using like this
==================

using System;
using EwaoListingCommon;

namespace Cititown.myemails
{
       /// <summary>
       /// Summary description for Compose.
       /// </summary>
       public class ListingComposeGraphic : XmlPage  , CommonPage
                                                         // SEE HERE
       {
               protected System.Web.UI.HtmlControls.HtmlInputHidden
hPostingID;

               private void Page_Load ( object sender, EventArgs e )
               {
                       bool bFileRemoved = false;
                }
          }
}

I got error like this is not type of interface
Marc Gravell - 23 Nov 2006 12:24 GMT
I suspect that you are attempting multiple inheritance, which isn't
supported in C# (or .Net AFAIK); ListingComposeGraphic can inherit from one
or the other, but not both.

But! don't tell us something *like* the error message. Just copy / paste. It
will be less typing, and might actually tell us the problem!!!
</rant>

Marc
Christof Nordiek - 23 Nov 2006 12:29 GMT
Hi Sala,

C# doesn't support multiple inheritance for classes.

in the line:

>        public class ListingComposeGraphic : XmlPage  , CommonPage

you try to inherit from 2 classes. That's not posseble.

If CommonPage were an interface, this would be possible. That's why the
compiler says 'this is not type of interface'

> Hi experts!
>
[quoted text clipped - 74 lines]
>
> I got error like this is not type of interface
Marc Gravell - 23 Nov 2006 12:15 GMT
Unless you actually go to the trouble of telling people what error you get
(exact text), and when (runtime / compile-time), I doubt many people are
going to bother trying to infer...

Marc
Sala - 23 Nov 2006 12:28 GMT
I got error msg when am compiling...
   Error :
C:\Inetpub\wwwroot\Cititown\ListingComposeGraphic.aspx.cs(26):
'CommonPage' : type in interface list is not an interface

> Unless you actually go to the trouble of telling people what error you get
> (exact text), and when (runtime / compile-time), I doubt many people are
> going to bother trying to infer...
>
> Marc
Sala - 23 Nov 2006 12:33 GMT
Thanks . Ok how i'll access that class in ComposeGraphic ? Pls tell me

> I got error msg when am compiling...
>     Error :
[quoted text clipped - 6 lines]
>
> > Marc- Hide quoted text -- Show quoted text -
Marc Gravell - 23 Nov 2006 12:41 GMT
See other post; you're currently attempting to use multiple inheritance. I
can't answer tell you the correct way of accessing it unless you can clarify
what you are trying to do... it really isn't very clear, sorry.

Marc
Sala - 23 Nov 2006 12:50 GMT
Once again thanks!
> See other post; you're currently attempting to use multiple inheritance. I
> can't answer tell you the correct way of accessing it unless you can clarify
> what you are trying to do... it really isn't very clear, sorry.
>
> Marc

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.