Cita:
No me compila porque me dice que "using System.Web.Mail;" is a namespace and cannot be used as an expression. <%
using System.Web.Mail;
string ToMail = "[email protected]";
string From = "[email protected]";
string Subject = "The Famous";
string Body = "Hello World";
SmtpMail.Send(From,ToMail,Subject,Body);
%>
using System.Web.Mail;
string ToMail = "[email protected]";
string From = "[email protected]";
string Subject = "The Famous";
string Body = "Hello World";
SmtpMail.Send(From,ToMail,Subject,Body);
%>
Que me esta faltando ???
El error completo es este:
Cita:
Ayuda! C:\TEMP13\EnviarMail.aspx(41) : error BC36008: 'Using' must end with a matching 'End Using'.
using System.Web.Mail;
~~~~~~~~~~~~~~~~~~~~~~
C:\TEMP13\EnviarMail.aspx(41) : error BC30112: 'System.Web.Mail' is a namespace and cannot be used as an expression.
using System.Web.Mail;
~~~~~~~~~~~~~~~
C:\TEMP13\EnviarMail.aspx(41) : error BC30037: Character is not valid.
using System.Web.Mail;
~
C:\TEMP13\EnviarMail.aspx(43) : error BC30287: '.' expected.
string ToMail = "[email protected]";
~~~~~~
C:\TEMP13\EnviarMail.aspx(44) : error BC30287: '.' expected.
string From = "[email protected]";
~~~~
C:\TEMP13\EnviarMail.aspx(45) : error BC30287: '.' expected.
string Subject = "The Famous";
~~~~~~~
C:\TEMP13\EnviarMail.aspx(46) : error BC30287: '.' expected.
string Body = "Hello World";
~~~~
C:\TEMP13\EnviarMail.aspx(48) : error BC30037: Character is not valid.
SmtpMail.Send(From,ToMail,Subject,Body);
using System.Web.Mail;
~~~~~~~~~~~~~~~~~~~~~~
C:\TEMP13\EnviarMail.aspx(41) : error BC30112: 'System.Web.Mail' is a namespace and cannot be used as an expression.
using System.Web.Mail;
~~~~~~~~~~~~~~~
C:\TEMP13\EnviarMail.aspx(41) : error BC30037: Character is not valid.
using System.Web.Mail;
~
C:\TEMP13\EnviarMail.aspx(43) : error BC30287: '.' expected.
string ToMail = "[email protected]";
~~~~~~
C:\TEMP13\EnviarMail.aspx(44) : error BC30287: '.' expected.
string From = "[email protected]";
~~~~
C:\TEMP13\EnviarMail.aspx(45) : error BC30287: '.' expected.
string Subject = "The Famous";
~~~~~~~
C:\TEMP13\EnviarMail.aspx(46) : error BC30287: '.' expected.
string Body = "Hello World";
~~~~
C:\TEMP13\EnviarMail.aspx(48) : error BC30037: Character is not valid.
SmtpMail.Send(From,ToMail,Subject,Body);