Hi..!
I have xslt code that displays staff information, on that information i want to add a textbox that will allow a user to change email. The user must then click the Send Notification button that will send an email to notify me that the email of that user has been changed
here is my xslt code:
="1.0"="iso-8859-1"
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<table>
<tr>
<th>Staff Details</th>
</tr>
<tr>
<th class="th" align="center">Details as stored on ITS: </th>
</tr>
</table>
</div>
</div>
<table>
<xsl:for-each select="EmployeeBio">
<tr>
<td>
<b>Staff Number:</b>
</td>
<td>
<xsl:value-of select="EmployeeID"/>
</td>
</tr>
<tr>
<td>
<b>Surname:</b>
</td>
<td>
<xsl:value-of select="LastName"/>
</td>
</tr>
<tr>
<td>
<b>Names:</b>
</td>
<td>
<xsl:value-of select="Name"/>
</td>
</tr>
<tr>
<td>
<b>Initials:</b>
</td>
<td>
<xsl:value-of select="Initials"/>
</td>
<tr>
<td>
<b>Email:</b>
</td>
<td>
<xsl:value-of select="Email"/>
</td>
</tr>
<tr>
<td>
<b>New Email:</b>
</td>
<td>
<input type="text" id="txtNewMail" />
</td>
</tr>
<tr>
<td colspan="2">
<center>
<a href="./SendNotification.aspx?Email={Email} & newMail={txtNewMail}">
<input type="Button" value="Send Notification" />
</a>
</center>
</td>
I want to get the value of the textbox and use it to send an email
Here is the code to send the email:
protected void Page_Load(object sender, EventArgs e)
{
using (MailMessage message = new MailMessage())
{
message.From = new MailAddress(Request.QueryString["Email"]);
message.To.Add(new MailAddress("khumalon@tut.ac.za"));
message.Subject = "Testing EmailUpDater project";
message.Body = "The email: " + Request.QueryString["Email"] + " has been changed to: " + Request.QueryString["txtNewMail"];
SmtpClient client = new SmtpClient();
client.Host = "smtp.tut.ac.za";
client.Send(message);
}
Label1.Text = "Notification sent";
}