Hello everyone. i m posting the same porblem again cause i didnt get any good responce please help me
i need your help. (Amit and kirtan please check this out)
i designed a form for add user and after submit the all required information that form mail some data to the user account which use give in email section.
like First/last Name. Security Question and Security Answer.
i dont want html mail sending i need in aspx.cs page
my code doing it but the problem is that i cannot set the body of this mail. all details mail in single line but i want it going in proper manner. like this....
First Name
Last Name
Security Question
Security Answer
or
can anyone tell me how to do this
i attached my page along with this post
i used mater page in my project so please set this form in normal aspx page
Thanks Alot
i need your help. (Amit and kirtan please check this out)
i designed a form for add user and after submit the all required information that form mail some data to the user account which use give in email section.
like First/last Name. Security Question and Security Answer.
i dont want html mail sending i need in aspx.cs page
my code doing it but the problem is that i cannot set the body of this mail. all details mail in single line but i want it going in proper manner. like this....
First Name
Last Name
Security Question
Security Answer
or
|
FirstName |
Abcd |
|
Last Name |
XYZ |
|
Security Question |
Question |
|
Security Answer |
Answer |
can anyone tell me how to do this
i attached my page along with this post
i used mater page in my project so please set this form in normal aspx page
Thanks Alot
Amit ChoudharyRank #145 · 15.8K reputationPosted Jun 7, 2010, 2:14 AM EDT
follow this article:
http://www.4guysfromrolla.com/articles/062508-1.aspx
it has the mail sending for your email verification using creating user wizard control.
go through this i must admit you are surely looking for such type of trick to send email with user's information. and its rather preferable then creating mail body using string builder at run time.
Download the project associated its in VB i know you can convert it easily in c#.
Kapil Deo MalhotraRank #2,120 · 672 reputationPosted Jun 6, 2010, 12:49 PM EDT
When you are building your body string, you are concatenating the string so that's why it is not showing in different lines. As you sent the body type as HTML you can build with html
string Body = "Thank you for registered your self with OnlineAddressBook.com." +
Environment.NewLine +"Email Id:"+""+
txtEmailId.Text +"Password:"+""+ txtPassword.Text +
"Security Question:"+""+ txtSecQuestion.Text + "Answer"+""+
txtSecAnswer.Text;
Instead you can use the following with
or build with
string Body = "Thank you for registered your self with OnlineAddressBook.com.
" +
+"Email Id:"+""+
txtEmailId.Text +"
Password:"+""+ txtPassword.Text +
"
Security Question:"+""+ txtSecQuestion.Text + "
Answer"+""+
txtSecAnswer.Text;
Or you can use the Table tag to build the output in table format
Hope that will help you
Rashid Khan152 reputationPosted Jun 6, 2010, 1:22 PM EDT
that the problem how can i use table in c# page.
ur right in ur post but i dont know how to use table in this case,
if u know please tell me
thanks again
Kapil Deo MalhotraRank #2,120 · 672 reputationPosted Jun 6, 2010, 5:20 PM EDT
You can do in the following manner and use
StringBuilder builder = new StringBuilder();
builder.Append("Thank you for registered your self with OnlineAddressBook.com.");
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
builder.Append("
string body = builder.ToString()
Rashid Khan152 reputationPosted Jun 6, 2010, 11:57 PM EDT
you help me alot
and its working
thank u
Regards
Rashid
Rashid Khan152 reputationPosted Jun 7, 2010, 4:06 AM EDT
i'll surely read that article and the project which you send, and try to use .
Thanks for you kind support Kapil nd Amit
Have nice day
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts