having multiple classes with WebMethods in single WebSerivce??

F

Farooq Khan

hi everybody,
i'm writing a web srevice having some functionality [WebMethods] that
logically shouldnt be the part of a single class. i tried using multiple
classes in the same .asmx.cs file (webservice). those classes are supposed
to have WebMethods of their own. but i cannot do that. the problem is that i
can only expose (as i have seen) single class having WebMethods.
let me know if i'm right about that?? and if i am, is there any way to do
that?? i just want to have different WebMethods in logically different
classes, all combined in single webservice.
Thanks.

Best Regards,
Farooq Khan
 
B

BruceJohnson

Only one class in an asmx file can expose web methods. However, from an
architectural perspective, I always felt it best to keep that class
down to a minimum. So all of the business logic should be in separate
classes anyway. But that's just one man's opinion. :)

Bruce Johnson
http://www.ObjectSharp.com/Bruce
 
F

Farooq Khan

thanks Bruce,
That's what i thought of...anyway....thanks for ur help!!

Best regards,
Farooq Khan
 

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

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,175
Latest member
Vinay Kumar_ Nevatia
Top