method in Class not visible

Discussion in 'ASP .Net Web Services' started by Erkan KURTULUÞ, Dec 25, 2003.

  1. Hi Everbody,

    i want to any class send to client side with Web Method. But there is a
    method in this class. altough its all property can be pass on client side, A
    method can't be pass. how can i pass a method in class?
    [WebMethod]

    public ogr getogr

    {

    return new ogr();

    }

    public class ogr

    {

    int i;

    public string test

    {

    Return "test";

    }

    }

    Client side

    public void getogr

    {

    WebService.ogr _ogr = WebService.getogr();

    _ogr.test(); // invisible

    }
     
    Erkan KURTULUÞ, Dec 25, 2003
    #1
    1. Advertising

  2. Erkan KURTULUÞ

    Jan Tielens Guest

    This is default behavior. You can't change it.

    --
    Greetz,
    Jan
    __________________________________
    Read my weblog: http://weblogs.asp.net/jan
    "Erkan KURTULUÞ" <> schreef in bericht
    news:...
    > Hi Everbody,
    >
    > i want to any class send to client side with Web Method. But there is a
    > method in this class. altough its all property can be pass on client side,

    A
    > method can't be pass. how can i pass a method in class?
    > [WebMethod]
    >
    > public ogr getogr
    >
    > {
    >
    > return new ogr();
    >
    > }
    >
    > public class ogr
    >
    > {
    >
    > int i;
    >
    > public string test
    >
    > {
    >
    > Return "test";
    >
    > }
    >
    > }
    >
    > Client side
    >
    > public void getogr
    >
    > {
    >
    > WebService.ogr _ogr = WebService.getogr();
    >
    > _ogr.test(); // invisible
    >
    > }
    >
    >
    >
    >
     
    Jan Tielens, Dec 26, 2003
    #2
    1. Advertising

  3. may be you can create another service for the "test method" or published it
    as meber of "ogr", the behaviour is actually caused when ogr is serialized
    to XML, in only serializes the public members,

    but if you really want to this , then web services is not an option, .Net
    remoting make more sense when you can have an interface on both side,

    Regards
    --
    Erymuzuan Mustapa
    Inter Virtual Sdn. Bhd.
    See MIND at http://www.MIND.com.my



    "Erkan KURTULUÞ" <> wrote in message
    news:...
    > Hi Everbody,
    >
    > i want to any class send to client side with Web Method. But there is a
    > method in this class. altough its all property can be pass on client side,

    A
    > method can't be pass. how can i pass a method in class?
    > [WebMethod]
    >
    > public ogr getogr
    >
    > {
    >
    > return new ogr();
    >
    > }
    >
    > public class ogr
    >
    > {
    >
    > int i;
    >
    > public string test
    >
    > {
    >
    > Return "test";
    >
    > }
    >
    > }
    >
    > Client side
    >
    > public void getogr
    >
    > {
    >
    > WebService.ogr _ogr = WebService.getogr();
    >
    > _ogr.test(); // invisible
    >
    > }
    >
    >
    >
    >
     
    Erymuzuan Mustapa, Dec 29, 2003
    #3
    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. tshad

    button visible/not visible

    tshad, Oct 26, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    4,500
    Brian Hoops
    Oct 28, 2004
  2. tshad

    Sections visible and not visible

    tshad, Jan 31, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    2,091
    tshad
    Jan 31, 2005
  3. Patrick Olurotimi Ige
    Replies:
    7
    Views:
    6,047
    Patrick Olurotimi Ige
    Jun 15, 2005
  4. tshad
    Replies:
    1
    Views:
    4,340
    tshad
    Oct 31, 2009
  5. Jurjen de Groot
    Replies:
    0
    Views:
    332
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page