asp.net - I can't call a method that's in the App_Code folder within the ashx file -


I have a problem (do not know what happened because of this - previously worked fine):

I can not call a function in the ashx file from the App_Code folder (with a regular code behind the C # file, it's working fine).

The name of the class is SendMail and the name of the method is SendEmail

the handler file:

< Img src =

Enter image details here

method < / P>

Enter image details here

What could be the reason for this ?

You have two sections named SendMail , which are both compilers and both Confuses you I highly recommend the more meaningful naming of your components.

If your classes are in two different namespaces, then you can clearly specify the target class using your entire namespace. Something like this:

  your namespace.Sandmail  

Then you can call the method:

  bool mailsant = Your namespace. Sendmail. SendEmail (first name, last name, ...  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -