•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 427,489 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,449 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2214 | Replies: 1
![]() |
•
•
Join Date: Aug 2006
Posts: 1
Reputation:
Rep Power: 0
Solved Threads: 0
Hello,
- I’ve made an form where users can subscribe.
- When they click on the submit button then they will receive an email with their data they have filled in on the form.
- There will be also an email send to an administrator with the same data as the user received BUT with 2 extra “links” (Accepten Deny)
- When the admin clicks on the “Accept” link then it will be forwarded to the “Approval.aspx” page
Now is the question:
Is it possible to have the data that in the email is, publish on the page (approval.aspx) to?
I’ve put the following in my code:
//Send mail to User
string mail = "";
mail += "Full Name: " + TxtLastname.Text + "\t"+ TxtFirstname.Text + "\n";
mail += "Street: " + TxtStreet.Text + "\n";
mail += "Zip: " + TxtZip.Text + "\n";
mail += "City: " + TxtCity.Text + "\n";
mail += "Phone: " + TxtPhone.Text + "\n";
mail += "Email: " + TxtEmail.Text + "\n";
MailMessage Mailer = new MailMessage();
Mailer.From = TxtEmail.Text;
Mailer.To = "unie.test@example.be";
Mailer.Subject = "Ask for a password.";
Mailer.Body = mail + "\n" + "Note: You will receive a notification email, when you're accept by the administrator then you will receive a Username and a Password.";
SmtpMail.SmtpServer = "";
try
{
SmtpMail.Send(Mailer);
}
catch (Exception ex)
{
lblMessage.Text = "<b>Exception Occured:</b> " + ex;
}
finally
{
lblMessage.Text = "Your E-mail has been sent sucessfully";
}
//Send mail to Administrator
string message = "";
strEmail = TxtEmail.Text;
message += "Full Name: " + TxtLastname.Text + "  " + TxtFirstname.Text + "<br>";
message += "Street: " + TxtStreet.Text + "<br>";
message += "Zip: " + TxtZip.Text + "<br>";
message += "City: " + TxtCity.Text + "<br>";
message += "Phone: " + TxtPhone.Text + "<br>";
message += "Email: " + TxtEmail.Text + "<br>";
MailMessage Mail = new MailMessage();
Mail.From = TxtEmail.Text;
Mail.To = "unie.test@example.be";
Mail.Subject = "Ask for a password.";
Mail.BodyFormat = MailFormat.Html;
Mail.Body = message + "<br>" + "<a href='http://www.example.be/01/Approval_BE_NL.aspx?approval=accept'>Accept</a>" + "  " + "<a href='http://www.example.be/01/Approval_BE_NL.aspx?approval=deny'>Deny</a>";
SmtpMail.SmtpServer = "";
try
{
SmtpMail.Send(Mail);
}
catch (Exception ex)
{
lblMessage.Text = "<b>Exception Occured:</b> " + ex;
}
finally
{
lblMessage.Text = "Your E-mail has been sent sucessfully";
}
The reason why I need the info of the user in the Approval.aspx page, is to put the user his/her info into the database.
Is this possible and if yes, Is it possible to help me to do how?
Great thanks,
Unie
- I’ve made an form where users can subscribe.
- When they click on the submit button then they will receive an email with their data they have filled in on the form.
- There will be also an email send to an administrator with the same data as the user received BUT with 2 extra “links” (Accepten Deny)
- When the admin clicks on the “Accept” link then it will be forwarded to the “Approval.aspx” page
Now is the question:
Is it possible to have the data that in the email is, publish on the page (approval.aspx) to?
I’ve put the following in my code:
//Send mail to User
string mail = "";
mail += "Full Name: " + TxtLastname.Text + "\t"+ TxtFirstname.Text + "\n";
mail += "Street: " + TxtStreet.Text + "\n";
mail += "Zip: " + TxtZip.Text + "\n";
mail += "City: " + TxtCity.Text + "\n";
mail += "Phone: " + TxtPhone.Text + "\n";
mail += "Email: " + TxtEmail.Text + "\n";
MailMessage Mailer = new MailMessage();
Mailer.From = TxtEmail.Text;
Mailer.To = "unie.test@example.be";
Mailer.Subject = "Ask for a password.";
Mailer.Body = mail + "\n" + "Note: You will receive a notification email, when you're accept by the administrator then you will receive a Username and a Password.";
SmtpMail.SmtpServer = "";
try
{
SmtpMail.Send(Mailer);
}
catch (Exception ex)
{
lblMessage.Text = "<b>Exception Occured:</b> " + ex;
}
finally
{
lblMessage.Text = "Your E-mail has been sent sucessfully";
}
//Send mail to Administrator
string message = "";
strEmail = TxtEmail.Text;
message += "Full Name: " + TxtLastname.Text + "  " + TxtFirstname.Text + "<br>";
message += "Street: " + TxtStreet.Text + "<br>";
message += "Zip: " + TxtZip.Text + "<br>";
message += "City: " + TxtCity.Text + "<br>";
message += "Phone: " + TxtPhone.Text + "<br>";
message += "Email: " + TxtEmail.Text + "<br>";
MailMessage Mail = new MailMessage();
Mail.From = TxtEmail.Text;
Mail.To = "unie.test@example.be";
Mail.Subject = "Ask for a password.";
Mail.BodyFormat = MailFormat.Html;
Mail.Body = message + "<br>" + "<a href='http://www.example.be/01/Approval_BE_NL.aspx?approval=accept'>Accept</a>" + "  " + "<a href='http://www.example.be/01/Approval_BE_NL.aspx?approval=deny'>Deny</a>";
SmtpMail.SmtpServer = "";
try
{
SmtpMail.Send(Mail);
}
catch (Exception ex)
{
lblMessage.Text = "<b>Exception Occured:</b> " + ex;
}
finally
{
lblMessage.Text = "Your E-mail has been sent sucessfully";
}
The reason why I need the info of the user in the Approval.aspx page, is to put the user his/her info into the database.
Is this possible and if yes, Is it possible to help me to do how?
Great thanks,
Unie
![]() |
•
•
•
•
•
•
•
•
DaniWeb ASP.NET Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
.net .net framework 3.0 access advertisment ajax asp browser code combo custom data development dom dropdownlist email encryption eu feed firefox google imap microsoft module mozilla net news open source opinion outlook penelope phishing professional reader research reuse scam security skin spam spamming sql technology theme thunderbird weather web webmail windows workflow xml xoap
- Updated : Simple ASP.Net Login Page (ASP.NET)
- Simple Email Form in ASP.Net (ASP.NET)
- How To Hyperlink Normal HTML page with ASP.NET Page? (ASP.NET)
- Email Sending Problem in ASP.NET (ASP.NET)
- richtextbox in asp.net (ASP.NET)
- Forms Authorization/ Authentication using asp .net and vb .net (ASP.NET)
Other Threads in the ASP.NET Forum
- Previous Thread: Retrieve Information from Database & Display into ASP.NET Web Controls Textbox
- Next Thread: FREE DotNetNuke File Manager, FREE ASP.NET POP3 and more


Linear Mode