Foros del Web » Programando para Internet » ASPX (.net) »

Ayuda con Imagen por Email

Estas en el tema de Ayuda con Imagen por Email en el foro de ASPX (.net) en Foros del Web. Saludos a todos espero alguien me pueda ayudar tengo un problema tengo un pequeño modulito en Visual estudio 2008 asp.net(C#) estoy enviando por email un ...
  #1 (permalink)  
Antiguo 06/07/2010, 08:41
 
Fecha de Ingreso: diciembre-2003
Mensajes: 595
Antigüedad: 20 años, 4 meses
Puntos: 1
Ayuda con Imagen por Email

Saludos a todos espero alguien me pueda ayudar tengo un problema tengo un pequeño modulito en Visual estudio 2008 asp.net(C#) estoy enviando por email un formulario
y agregando una imagen Attachment el problema que tengo es que no se como decirle que la imagen me la posicione en el top del body y centrada alguien sabra como hacerlo

Asi cargo mi imagen


Attachment imagen = new Attachment(Server.MapPath("~/imagenes/logox.jpg"),
System.Net.Mime.MediaTypeNames.Image.Jpeg);


mail.Attachments.Add(imagen);

y asi cargo mi plantilla HTML

mail.Body = "<img src='imagenes/logox.jpg' align='top'> " +
" <html> " +
" <head> " +
" <title>EPIDEMIOLOGIA</title> " +
" <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'><style type='text/css'> " +
"<!--" +
"body,td,th {" +
" font-family: Arial, Helvetica, sans-serif;" +
" font-size: 14px; " +
"}" +
" " +
" --> " +
"</style></head> " +
" <body > " +

" <br> " +
" <br> " +
" <table border=0 width=550 align=center> " +
" <tr bgcolor='#FF0000'> " +
" <td height='37' bgcolor='OliveDrab'> " +
" <center> " +
" <font color='#FFFFFF' size='2' face='Arial'><strong>Estimado usuario favor de validar la informacion que registro " +
" </strong></font></center></td> " +
" </table> " +
"<table border=0 width=550 background='#ccff66' align=center> " +
"<tr> " +
" <td bgcolor='#ccff66' style='text-align: center'><blockquote> " +
" <table border='0' width='70%' cellspacing='2' cellpadding='2' id ='Tablaemail' runat='server' > " +

" <td valign=top style='width: 177px;text-align: left; height: 46px'>&nbsp;<br /> " +
" <asp:Label ID='Label8' runat='server' Text='Nombre' Font-Bold='True'>" + lblnombre.Text + " </asp:Label></td> " +
" <td style='height: 46px; text-align: left;'>&nbsp;<asp:TextBox ID='txtTexto' onChange='javascript:this.value=this.value.toUpper Case();' runat='server'>" + txtnombre.Text + "</asp:TextBox></td> " +
" </tr> " +
" <tr> " +
" <td style='width: 177px;text-align: left; height: 46px ' valign='top'> " +
" <asp:Label ID='Label4' runat='server' Font-Bold='True' Text='Apellido Paterno'>" + lblpaterno.Text + " </asp:Label></td> " +
" <td style='height: 46px; text-align: left'> " +
" <asp:TextBox ID='txtpaterno' onChange='javascript:this.value=this.value.toUpper Case();' runat='server'>" + txtpaterno.Text + "</asp:TextBox></td> " +
" </tr> " +
" <tr> " +
" <td style='width: 177px;text-align: left; height: 46px' valign='top'> " +
" <asp:Label ID='Label5' runat='server' Font-Bold='True' onChange='javascript:this.value=this.value.toUpper Case();' Text='Apellido Materno'>" + lblmaterno.Text + "</asp:Label></td> " +
" <td style='height: 46px; text-align: left'> " +
" <asp:TextBox ID='txtmaterno' onChange='javascript:this.value=this.value.toUpper Case();' runat='server'>" + txtmaterno.Text + "</asp:TextBox></td> " +
" </tr> " +
" <tr> " +
" <td style='width: 177px; text-align: left; height: 46px' valign='top'> " +
" <br /> " +
" <asp:Label ID='Label9' runat='server' Font-Bold='True' Text='Edad'>" + lbledad.Text + "</asp:Label></td> " +
" <td style='height: 46px; text-align: left'> " +
" <asp:TextBox ID='txtedad' runat='server'> " + txtedad.Text + "</asp:TextBox></td> " +
" </tr> " +
" <tr> " +
" <td colspan='2'> " +
" </tr> " +
" </table>" +
" </body> " +
"</html>";

Etiquetas: email, aspx
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 01:50.