Link to home
Start Free TrialLog in
Avatar of R8VI
R8VI

asked on

c# sending email

Hi,

I am sending an email VIA c# in a string format like
body = "the email made up with html"

In here I have a link like so

http://thes.com/x.aspx?CompanyId=1&ImageID=1&EmailID=2\

But instead of hard coding the values for CompanyId, ImageID, and EmailID I want to pass the variables

sCompanyID, sImageID, sEmailID

Please help

Thanks

R8VI
Avatar of Tapan Pattanaik
Tapan Pattanaik
Flag of India image

Avatar of R8VI
R8VI

ASKER

Hi

Thanks for this, the question is not about sending emails sorry its about how do I append the variables to the HTML string
C#
string companyID = "1";
string ImageID = "1";
string EmailsID = "2";

string urlString = "http://thes.com/x.aspx?" + companyID + ImageID + EmailID + "\\";

VB
Dim companyID as string = "1"
Dim ImageID as string = "1"
Dim EmailsID as string = "2"

Dim urlString as string =  "http://thes.com/x.aspx?" & CompanyId & ImageID & EmailID & "\"
ASKER CERTIFIED SOLUTION
Avatar of guru_sami
guru_sami
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jitendra patil
try the below code
C#
string companyID = "1";
string ImageID = "1";
string EmailsID = "2";
string url="http://thes.com/x.aspx?companyID="+companyID+"&ImageID="+ImageID+"&EmailID="+EmailsID+"\"

VB
Dim companyID as string = "1"
Dim ImageID as string = "1"
Dim EmailsID as string = "2"

Dim url as string = "http://thes.com/x.aspx?companyID="&CompanyId&"&ImageID="&ImageID&"&EmailID="EmailID& "\" .

hope this helps.
I would prefer ID 39533782 as best answer.