 |
BOOK: Beginning ASP.NET 4 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|
|

January 19th, 2013, 07:00 PM
|
|
Authorized User
|
|
Join Date: Oct 2012
Posts: 27
Thanks: 4
Thanked 2 Times in 2 Posts
|
|
Adding data into SignUpConfirmation.txt - ch.16, page 593
I created a new textbox, (ID)=Points, on the SignUp page, and I'd like to put its content, ex "123", in the SignUpConfirmation.txt, for the user to get it along with its user name and password.
I tried this:
--------------------------------------------------
User name: <% UserName %>
Your password: <% Password %>
Points: <%# Points.text %>
--------------------------------------------------
The Points expression does not work: it appears as is this in the email.
Could someone help me with that?
|
|

January 19th, 2013, 07:20 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Only UserName and Password are available on these templates. For other fields you need to replace your own values as is done with the ContactForm. You can use the MailSending event to access the MailMessage and then modify the body text.
Hope this helps,
Imar
|
|

January 20th, 2013, 12:11 PM
|
|
Authorized User
|
|
Join Date: Oct 2012
Posts: 27
Thanks: 4
Thanked 2 Times in 2 Posts
|
|
Success
Thank you Imar,
Your suggestion was of great help.
By the way, the Thanks button was not available on the reply to use it.
In fact, I used SendingMail event, entering the following code:
Code:
protected void CreateUserWizard1_SendingMail(object sender, MailMessageEventArgs e)
{
e.Message.IsBodyHtml = false;
e.Message.Body = e.Message.Body.Replace("<% Points %>", Points.Text);
}
I the SignUpConfirmation.txt, the text to replace is entered as: <% Points %>.
It worked OK.
I found that method be clicking F1 , then doing a search on "sendingmail event", then selecting from results: "CreateUserWizard.SendingMail". The topic contained a ready-to-use example.
|
|

January 25th, 2013, 04:03 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Hi there,
Thanks for posting the update. Much appreciated....
>> By the way, the Thanks button was not available on the reply to use it.
You may have clicked the image in my signature, which is just an image. There's also a Thanks button below the actual post.
Cheers,
Imar
|
|

January 26th, 2013, 01:18 AM
|
|
Authorized User
|
|
Join Date: Oct 2012
Posts: 27
Thanks: 4
Thanked 2 Times in 2 Posts
|
|
Thanks button not available
I still cannot find the Thanks button.
I definitely didn't click on the image in our signature, but looked for the <Thanks icon> similar to the one inserted in the text:
"Did this post help you? Click the <Thanks icon> button below this post to show your appreciation!"
What I understood from this indication is that if I want to thank you without even replying, because , for instance, I'm very pleased with your answer , but I have no more follow-up to post, it's enough to click the <Thanks icon>. However, there's no clickable<Thanks icon> in your reply.
The above is just an explanation and I really don't insist on this issue. I can thank you directly in my post, which I do most sincerely.
|
|

January 26th, 2013, 09:10 AM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Quote:
|
What I understood from this indication is that if I want to thank you without even replying, because , for instance, I'm very pleased with your answer , but I have no more follow-up to post, it's enough to click the <Thanks icon>.
|
Indeed.
Quote:
|
However, there's no clickable<Thanks icon> in your reply.
|
That's odd. Oh well, not that important.....
Cheers,
Imar
|
|
 |
|