将名称传递给HTM文件 [英] Pass the name into HTM file

查看:60
本文介绍了将名称传递给HTM文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个HTML,我将其作为字符串加载并通过MailMessage类发送。

oMailMessage.Body = cHTMLString



在将其作为电子邮件发送之前,我需要将HTM文件传递给用户


第一行中的第一个和最后一个。



这是一个表单,用户输入他/她的详细信息然后它是


通过电子邮件正文中的HTM文件向用户发送电子邮件。



它会开始的:



史蒂夫史密斯,



怎么样我将用户的名字和姓氏嵌入到htm文件中?



谢谢,









解决方案

"&的Joep QUOT; < DF **** @ hotmail.comwrote in message

news:ug ************** @ TK2MSFTNGP03.phx.gbl ...


我有一个HTML,我将其作为字符串加载并通过MailMessage类发送。

oMailMessage.Body = cHTMLString


在作为电子邮件发送之前我需要将HTM文件传递给用户

第一行中的第一个和最后一个。


它用户输入他/她的详细信息然后通过电子邮件正文中的HTM文件向用户发送电子邮件。


它将从以下开始:


您好史蒂夫史密斯,


如何将用户的名字和姓氏嵌入到htm文件?



oMailMessage.Body =" Hi" + txtFirstName.Text +" " + txtLastName.Text +

",\\\\\\\ nn ;;

oMailMessage.Body + = cHTMLString;


嗨Mark,


感谢您的回复。但是如何保持嵌入的Verdana字体

字符串?

此外,半列是一个问题并且出现了错误:字符不是

有效


oMailMessage.Body =" Hi" + txtFirstName.Text +" " + txtLastName.Text +

",\\\\\\\ nn ;;

oMailMessage.Body + = cHTMLString;


谢谢,


Joe


" JoeP" < DF **** @ hotmail.comwrote in message

新闻:Oj ************* @ TK2MSFTNGP04.phx.gbl ...


感谢您的回复。但是如何保持嵌入的Verdana字体

字符串?



oMailMessage.IsBodyHtml = true;


此外,半列是一个问题并得到一个错误的是:字符是

无效



啊 - 我以为你在使用C#...


如果您使用VB.NET,您(可能)需要执行以下操作:


oMailMessage.Body =" Hi" &安培; txtFirstName.Text& " " &安培; txtLastName.Text&

vbCrLf& vbCrLf

oMailMessage.Body = oMailMessage.Body& cHTMLString


oMailMessage.IsBodyHtml = True


Hi All,



I have an HTML which I load as string and send it via MailMessage class.
oMailMessage.Body = cHTMLString



Before it is sent as e-mail I need to pass the HTM file the user

First and Last in the first line.



It is a form where the user enters his/her details and then it is

e-mailed the user with the HTM file within the e-mail''s body.



It would start like:



Hi Steve Smith,



How can I embed the First and Last name of the user into the htm file?



Thanks,



Joe






解决方案

"JoeP" <DF****@hotmail.comwrote in message
news:ug**************@TK2MSFTNGP03.phx.gbl...

I have an HTML which I load as string and send it via MailMessage class.
oMailMessage.Body = cHTMLString

Before it is sent as e-mail I need to pass the HTM file the user
First and Last in the first line.

It is a form where the user enters his/her details and then it is
e-mailed the user with the HTM file within the e-mail''s body.

It would start like:

Hi Steve Smith,

How can I embed the First and Last name of the user into the htm file?

oMailMessage.Body = "Hi " + txtFirstName.Text + " " + txtLastName.Text +
",\r\n\r\n";
oMailMessage.Body += cHTMLString;


Hi Mark,

Thanks for your reply. But how do I keep the Verdana font of that embeded
string?
Also the semi column was a problem and got an err which is: Character is not
valid

oMailMessage.Body = "Hi " + txtFirstName.Text + " " + txtLastName.Text +
",\r\n\r\n";
oMailMessage.Body += cHTMLString;

Thanks,

Joe


"JoeP" <DF****@hotmail.comwrote in message
news:Oj*************@TK2MSFTNGP04.phx.gbl...

Thanks for your reply. But how do I keep the Verdana font of that embeded
string?

oMailMessage.IsBodyHtml = true;

Also the semi column was a problem and got an err which is: Character is
not valid

Ah - I assumed you were using C#...

If you''re using VB.NET, you''ll (probably) need to do something like:

oMailMessage.Body = "Hi " & txtFirstName.Text & " " & txtLastName.Text &
vbCrLf & vbCrLf
oMailMessage.Body = oMailMessage.Body & cHTMLString

oMailMessage.IsBodyHtml = True


这篇关于将名称传递给HTM文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆