<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DZone Snippets: Ms_michel's Code Snippets</title>
    <link>http://snippets.dzone.com/posts</link>
    <pubDate>Thu, 24 Jul 2008 07:21:46 GMT</pubDate>
    <description>DZone Snippets: Ms_michel's Code Snippets</description>
    <item>
      <title>VS2003 - Echec de l'actualisation du projet</title>
      <link>http://snippets.dzone.com/posts/show/1937</link>
      <description>Apr&#232;s avoir ferm&#233; toutes les session de Visual Studio, Passer dans l'explorateur de fichier et  aller dans le sous-r&#233;pertoire :&lt;br /&gt;&lt;br /&gt;- Documents and Settings&lt;br /&gt;-- "userlogin" (login de l'utilisateur)&lt;br /&gt;--- VSWebCache&lt;br /&gt;---- "hostname" (nom de la machine)&lt;br /&gt;&lt;br /&gt;Et supprimer le cache du projet qui pose probl&#232;me (ou &#233;ventuellement de tous les projets).</description>
      <pubDate>Wed, 19 Apr 2006 13:52:29 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1937</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>Throwing from XSLT</title>
      <link>http://snippets.dzone.com/posts/show/1613</link>
      <description>From http://weblogs.asp.net/george_v_reilly/archive/2006/03/01/439402.aspx&lt;br /&gt;&lt;br /&gt;I (George V. Reilly, not me) needed to add some declarative error checking to some XSLT templates recently. Specifically, I wanted to throw an error if my selects yielded an empty string, indicating that the input XML was wrong.&lt;br /&gt;&lt;br /&gt;Unfortunately, there seems to be no easy way of doing this in XSLT, nor in XslTransform. The approved way is to validate against an XSD schema, but for various reasons, I didn't want to go to the hassle of creating one.&lt;br /&gt;&lt;br /&gt;I found a partial solution using xsl:message with the terminate="yes" attribute. Under XslTransform.Transform() the following code throws an exception if the XPath expression is empty. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt; &lt;xsl:if test="not(/some/xpath/expression)"&gt;&lt;br /&gt;     &lt;xsl:message terminate="yes"&gt;Missing expression&lt;/xsl:message&gt;&lt;br /&gt; &lt;/xsl:if&gt;&lt;br /&gt; &lt;xsl:value-of select="/some/xpath/expression" /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It doesn't do anything, however, in XMLSpy.&lt;br /&gt;&lt;br /&gt;The downside, of course, is that you have to maintain the expression in two places, and the template becomes littered with those annoying tests. </description>
      <pubDate>Thu, 02 Mar 2006 12:27:33 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1613</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>HTTP 301 - Moved Permanently</title>
      <link>http://snippets.dzone.com/posts/show/1295</link>
      <description>&lt;code&gt;&lt;br /&gt;&lt;script runat="server"&gt;&lt;br /&gt;private void Page_Load(object sender, System.EventArgs e) {&lt;br /&gt;    Response.Status = "301 Moved Permanently";&lt;br /&gt;    Response.AddHeader("Location", "http://www.new-url.com");&lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;http://www.webconfs.com/how-to-redirect-a-webpage.php</description>
      <pubDate>Tue, 24 Jan 2006 18:13:32 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1295</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>Blogmarks to Html conversion</title>
      <link>http://snippets.dzone.com/posts/show/1206</link>
      <description>This file is intended to transform a Blogmarks atom feed (http://api.blogmarks.net/user/ms_michel) into html code fragment to be included in a complete page.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;br /&gt;&lt;xsl:stylesheet version="1.0" xmlns:atom="http://purl.org/atom/ns#draft-ietf-atompub-format-05" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;&lt;br /&gt;  &lt;xsl:output method="html" /&gt;&lt;br /&gt;  &lt;xsl:template match="/"&gt;&lt;br /&gt;    &lt;xsl:apply-templates select="/atom:feed/atom:head" mode="before" /&gt;&lt;br /&gt;    &lt;xsl:apply-templates select="/atom:feed/atom:entry" /&gt;&lt;br /&gt;    &lt;xsl:apply-templates select="/atom:feed/atom:head" mode="after" /&gt;&lt;br /&gt;  &lt;/xsl:template&gt;&lt;br /&gt;  &lt;xsl:template match="atom:feed/atom:head" mode="before" &gt;&lt;br /&gt;    &lt;!-- &lt;h3&gt;&lt;xsl:value-of select="atom:title" /&gt;&lt;/h3&gt; --&gt;&lt;br /&gt;  &lt;/xsl:template&gt;&lt;br /&gt;  &lt;xsl:template match="atom:feed/atom:head" mode="after"&gt;&lt;br /&gt;    &lt;p&gt;&lt;a href="{atom:link[@rel='alternate']/@href}"&gt;&lt;img src="http://blogmarks.net/img/88x31_neg.png" alt="blogmarks.net" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;  &lt;/xsl:template&gt;&lt;br /&gt;  &lt;xsl:template match="atom:feed/atom:entry"&gt;&lt;br /&gt;    &lt;div&gt;&lt;br /&gt;      &lt;xsl:choose&gt;&lt;br /&gt;        &lt;xsl:when test="position() mod 2 = 1"&gt;&lt;br /&gt;          &lt;xsl:attribute name="class"&gt;bm_blogmarks bm_odd&lt;/xsl:attribute&gt;&lt;br /&gt;        &lt;/xsl:when&gt;&lt;br /&gt;        &lt;xsl:otherwise&gt;&lt;br /&gt;          &lt;xsl:attribute name="class"&gt;bm_blogmarks bm_even&lt;/xsl:attribute&gt;&lt;br /&gt;        &lt;/xsl:otherwise&gt;&lt;br /&gt;      &lt;/xsl:choose&gt;&lt;br /&gt;      &lt;a href="{atom:link[@rel='related']/@href}"&gt;&lt;img src="{atom:link[@rel='image']/@href}" alt="" /&gt;&lt;/a&gt;&lt;br /&gt;      &lt;h4&gt;&lt;a href="{atom:link[@rel='related']/@href}"&gt;&lt;xsl:value-of select="atom:title" /&gt;&lt;/a&gt;&lt;/h4&gt;&lt;br /&gt;      &lt;p&gt;&lt;xsl:value-of select="atom:summary" disable-output-escaping="yes" /&gt;&lt;/p&gt;&lt;br /&gt;      &lt;p class="blogmarks-tags"&gt;&lt;br /&gt;        &lt;xsl:value-of select="substring(atom:published, 0, 11)" /&gt;&lt;br /&gt;        &lt;xsl:if test="atom:category"&gt;&lt;br /&gt;          &lt;xsl:for-each select="atom:category"&gt;&lt;br /&gt;            &lt;xsl:text&gt; - &lt;/xsl:text&gt;&lt;a href="{@term}{@sheme}"&gt;&lt;xsl:value-of select="@label" /&gt;&lt;/a&gt;&lt;br /&gt;          &lt;/xsl:for-each&gt;&lt;br /&gt;        &lt;/xsl:if&gt;&lt;br /&gt;      &lt;/p&gt;&lt;br /&gt;    &lt;/div&gt;&lt;br /&gt;  &lt;/xsl:template&gt;&lt;br /&gt;&lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;The generated html is inspired by the one used on Hot Links (http://dev.upian.com/hotlinks/). It can be styled with the following css:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;.bm_blogmarks {&lt;br /&gt;	margin: 10px auto;&lt;br /&gt;	padding: 1%;&lt;br /&gt;	background-color: #f5f5f5;&lt;br /&gt;	border: 1px solid #d9d9d9;&lt;br /&gt;	width: 97%;&lt;br /&gt;	overflow:auto;&lt;br /&gt;}&lt;br /&gt;.bm_even {&lt;br /&gt;    background-color: #fcfcfc;&lt;br /&gt;}&lt;br /&gt;.bm_blogmarks h4 {&lt;br /&gt;	margin-top: 0;&lt;br /&gt;}&lt;br /&gt;.bm_blogmarks p.bm_tags {&lt;br /&gt;	margin-bottom: 0;&lt;br /&gt;	display: block;&lt;br /&gt;	clear: left;&lt;br /&gt;}&lt;br /&gt;.bm_blogmarks img {&lt;br /&gt;	margin: 0 0px 5px 10px;&lt;br /&gt;	float: right;&lt;br /&gt;	border: 0;&lt;br /&gt;	clear: none;&lt;br /&gt;	width: 144px;&lt;br /&gt;	height: 107px;&lt;br /&gt;}&lt;br /&gt;.bm_even img {&lt;br /&gt;	margin: 0 10px 5px 0px;&lt;br /&gt;	float: left;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Fri, 20 Jan 2006 01:18:44 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1206</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>RDF to Html conversion</title>
      <link>http://snippets.dzone.com/posts/show/1164</link>
      <description>This file is intended to transform a RDF feed into html code fragment to be included in a complete page.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;br /&gt;&lt;xsl:stylesheet version="1.0"&lt;br /&gt;  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&lt;br /&gt;  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"&lt;br /&gt;  xmlns:dc="http://purl.org/dc/elements/1.1/"&lt;br /&gt;  xmlns:foo="http://purl.org/rss/1.0/"&gt;&lt;br /&gt;    &lt;xsl:output method="html"/&gt;&lt;br /&gt;    &lt;xsl:template match="/"&gt;&lt;br /&gt;        &lt;xsl:apply-templates select="/rdf:RDF/foo:channel"/&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;    &lt;xsl:template match="/rdf:RDF/foo:channel"&gt;&lt;br /&gt;        &lt;h3&gt;&lt;xsl:value-of select="foo:title"/&gt;&lt;/h3&gt;&lt;br /&gt;        &lt;p&gt;&lt;xsl:value-of select="foo:description"/&gt;&lt;/p&gt;&lt;br /&gt;        &lt;ul&gt;&lt;br /&gt;            &lt;xsl:apply-templates select="/rdf:RDF/foo:item"/&gt;&lt;br /&gt;        &lt;/ul&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;    &lt;xsl:template match="/rdf:RDF/foo:item"&gt;&lt;br /&gt;        &lt;li&gt;&lt;br /&gt;            &lt;a href="{foo:link}" title="{substring(dc:date, 0, 11)}"&gt;&lt;xsl:value-of select="foo:title"/&gt;&lt;/a&gt;&lt;br /&gt;            &lt;p&gt;&lt;xsl:value-of select="foo:description" disable-output-escaping="yes" /&gt;&lt;/p&gt;&lt;br /&gt;        &lt;/li&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;&lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 16 Jan 2006 20:04:56 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1164</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>RSS to Html conversion</title>
      <link>http://snippets.dzone.com/posts/show/1163</link>
      <description>This file is intended to transform a RSS feed (version 0.9x or 2.0) into html code fragment to be included in a complete page.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?xml version="1.0"?&gt;&lt;br /&gt;&lt;xsl:stylesheet version="1.0"&lt;br /&gt; xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&lt;br /&gt; xmlns:wfw="http://wellformedweb.org/CommentAPI/"&gt;&lt;br /&gt;    &lt;xsl:output method="html"/&gt;&lt;br /&gt;    &lt;xsl:template match="/"&gt;&lt;br /&gt;        &lt;xsl:apply-templates select="/rss/channel"/&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;    &lt;xsl:template match="/rss/channel"&gt;&lt;br /&gt;        &lt;h3&gt;&lt;xsl:value-of select="title"/&gt;&lt;/h3&gt;&lt;br /&gt;        &lt;p&gt;&lt;xsl:value-of select="description"/&gt;&lt;/p&gt;&lt;br /&gt;        &lt;ul&gt;&lt;br /&gt;            &lt;xsl:apply-templates select="item"/&gt;&lt;br /&gt;        &lt;/ul&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;    &lt;xsl:template match="/rss/channel/item"&gt;&lt;br /&gt;        &lt;li&gt;&lt;br /&gt;            &lt;a href="{link}" title="{substring(pubDate, 0, 11)}"&gt;&lt;xsl:value-of select="title"/&gt;&lt;/a&gt;&lt;br /&gt;            &lt;p&gt;&lt;xsl:value-of select="description" disable-output-escaping="yes" /&gt;&lt;/p&gt;&lt;br /&gt;        &lt;/li&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;&lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 16 Jan 2006 20:03:05 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1163</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>Atom to Html conversion</title>
      <link>http://snippets.dzone.com/posts/show/1162</link>
      <description>This file is intended to transform an Atom feed into html code fragment to be included in a complete page.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;?xml version="1.0" encoding="utf-8"?&gt;&lt;br /&gt;&lt;xsl:stylesheet version="1.0"&lt;br /&gt;  xmlns:atom="http://purl.org/atom/ns#"&lt;br /&gt;  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&lt;br /&gt;  xmlns:dc="http://purl.org/dc/elements/1.1/"&gt;&lt;br /&gt;    &lt;xsl:output method="html"/&gt;&lt;br /&gt;    &lt;xsl:template match="/"&gt;&lt;br /&gt;    &lt;xsl:apply-templates select="/atom:feed/atom:head"/&gt;&lt;br /&gt;        &lt;xsl:apply-templates select="/atom:feed"/&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;    &lt;xsl:template match="atom:feed/atom:head"&gt;&lt;br /&gt;        &lt;h3&gt;&lt;xsl:value-of select="atom:title"/&gt;&lt;/h3&gt;&lt;br /&gt;        &lt;xsl:if test="atom:tagline"&gt;&lt;p&gt;&lt;xsl:value-of select="atom:tagline"/&gt;&lt;/p&gt;&lt;/xsl:if&gt;&lt;br /&gt;        &lt;xsl:if test="atom:subtitle"&gt;&lt;p&gt;&lt;xsl:value-of select="atom:subtitle"/&gt;&lt;/p&gt;&lt;/xsl:if&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;    &lt;xsl:template match="/atom:feed"&gt;&lt;br /&gt;        &lt;h3&gt;&lt;xsl:value-of select="atom:title"/&gt;&lt;/h3&gt;&lt;br /&gt;        &lt;xsl:if test="atom:tagline"&gt;&lt;p&gt;&lt;xsl:value-of select="atom:tagline"/&gt;&lt;/p&gt;&lt;/xsl:if&gt;&lt;br /&gt;        &lt;xsl:if test="atom:subtitle"&gt;&lt;p&gt;&lt;xsl:value-of select="atom:subtitle"/&gt;&lt;/p&gt;&lt;/xsl:if&gt;&lt;br /&gt;        &lt;ul&gt;&lt;br /&gt;            &lt;xsl:apply-templates select="atom:entry"/&gt;&lt;br /&gt;        &lt;/ul&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;    &lt;xsl:template match="atom:entry"&gt;&lt;br /&gt;        &lt;li&gt;&lt;br /&gt;            &lt;a href="{atom:link[@rel='related']/@href}" title="{substring(atom:published, 0, 11)}"&gt;&lt;xsl:value-of select="atom:title"/&gt;&lt;/a&gt;&lt;br /&gt;            &lt;xsl:choose&gt;&lt;br /&gt;                &lt;xsl:when test="atom:content != ''"&gt;&lt;br /&gt;                    &lt;p&gt;&lt;xsl:value-of select="atom:content" disable-output-escaping="yes" /&gt;&lt;/p&gt;&lt;br /&gt;                &lt;/xsl:when&gt;&lt;br /&gt;                &lt;xsl:otherwise&gt;&lt;br /&gt;                    &lt;p&gt;&lt;xsl:value-of select="atom:summary" disable-output-escaping="yes" /&gt;&lt;/p&gt;&lt;br /&gt;                &lt;/xsl:otherwise&gt;&lt;br /&gt;            &lt;/xsl:choose&gt;&lt;br /&gt;        &lt;/li&gt;&lt;br /&gt;    &lt;/xsl:template&gt;&lt;br /&gt;&lt;/xsl:stylesheet&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Mon, 16 Jan 2006 19:59:16 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/1162</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>Build GoogleSearchService.dll from GoogleSearch.wsdl</title>
      <link>http://snippets.dzone.com/posts/show/976</link>
      <description>To generate the C# stub source type:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;wsdl GoogleSearch.wsdl&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;This will result in GoogleSearchService.cs.&lt;br /&gt;Compile with: &lt;br /&gt;&lt;code&gt;&lt;br /&gt;csc /target:library GoogleSearchService.cs&lt;br /&gt;(or mcs /target:library GoogleSearchService.cs for mono)&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Now you have the final stub assembly: GoogleSearchService.dll</description>
      <pubDate>Thu, 15 Dec 2005 00:38:35 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/976</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>How to work around the "double-click" problem</title>
      <link>http://snippets.dzone.com/posts/show/975</link>
      <description>This is a generic method to avoid "double-click" effect where a user click many times to validate. The button is hidden when the user clicks it. In order to not update all forms, the trick is applied to the Render event of the page.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;protected override void Render(HtmlTextWriter output) {&lt;br /&gt;    // Get normal html ouput&lt;br /&gt;    StringBuilder stringBuilder = new StringBuilder();&lt;br /&gt;    StringWriter stringWriter = new StringWriter(stringBuilder);&lt;br /&gt;    HtmlTextWriter htmlWriter = new HtmlTextWriter(stringWriter);&lt;br /&gt;    base.Render(htmlWriter);&lt;br /&gt;    string html = stringBuilder.ToString();&lt;br /&gt;    // Enhance submit buttons&lt;br /&gt;    string onclick1 = "\"if (typeof(Page_ClientValidate) == 'function') Page_ClientValidate();";&lt;br /&gt;    string onclick2 = "\"this.style.display='none';";&lt;br /&gt;    html = html.Replace("onclick=" + onclick1, "onclick=" + onclick2 + onclick1.Substring(1));&lt;br /&gt;    // Render updated html&lt;br /&gt;    output.Write(html);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Thu, 15 Dec 2005 00:32:50 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/975</guid>
      <author>ms_michel (Michel)</author>
    </item>
    <item>
      <title>Simple webform to test mail</title>
      <link>http://snippets.dzone.com/posts/show/906</link>
      <description>&lt;code&gt;&lt;br /&gt;&lt;%@ Page Language="C#" %&gt;&lt;br /&gt;&lt;%@ Import Namespace="System.Web.Mail" %&gt;&lt;br /&gt;&lt;script runat="server"&gt;    &lt;br /&gt;void btnSubmit_Click(Object sender, EventArgs e) {&lt;br /&gt;  MailMessage mail = new MailMessage();&lt;br /&gt;  mail.To = txtTo.Text;&lt;br /&gt;  mail.From = txtFrom.Text;&lt;br /&gt;  mail.Subject = txtSubject.Text;&lt;br /&gt;  mail.Body = txtMessage.Text;&lt;br /&gt;  mail.Priority = MailPriority.High;&lt;br /&gt;  mail.BodyFormat = MailFormat.Text;&lt;br /&gt;  SmtpMail.SmtpServer = txtSmtpServer.Text;&lt;br /&gt;  if (txtSmtpUsername.Text.Trim() != "") {&lt;br /&gt;    if (txtSmtpPassword.Text.Trim() != "") {&lt;br /&gt;      mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1");&lt;br /&gt;      mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", txtSmtpUsername.Text);&lt;br /&gt;      mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", txtSmtpPassword.Text);&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;  try {&lt;br /&gt;    SmtpMail.Send(mail);&lt;br /&gt;    Response.Write("OK!");&lt;br /&gt;  } catch (Exception ex) {&lt;br /&gt;    Response.Write("KO: " + ex.ToString());&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/script&gt;&lt;br /&gt;&lt;html&gt;&lt;br /&gt;  &lt;head&gt;&lt;br /&gt;    &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;&lt;br /&gt;    &lt;title&gt;Mail test&lt;/title&gt;&lt;br /&gt;  &lt;/head&gt;&lt;br /&gt;  &lt;body&gt;&lt;br /&gt;    &lt;form runat="server"&gt;&lt;br /&gt;      &lt;ul&gt;&lt;br /&gt;        &lt;li&gt;Smtp Server : &lt;asp:TextBox id="txtSmtpServer" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;Smtp Username : &lt;asp:TextBox id="txtSmtpUsername" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;Smtp Password : &lt;asp:TextBox id="txtSmtpPassword" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;From : &lt;asp:TextBox id="txtFrom" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;To : &lt;asp:TextBox id="txtTo" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;Subject : &lt;asp:TextBox id="txtSubject" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/li&gt;&lt;br /&gt;        &lt;li&gt;Message : &lt;asp:TextBox id="txtMessage" TextMode="MultiLine" runat="server"&gt;&lt;/asp:TextBox&gt;&lt;/li&gt;&lt;br /&gt;      &lt;/ul&gt;&lt;br /&gt;      &lt;asp:Button runat="server" id="btnSubmit" OnClick="btnSubmit_Click" Text="Send"&gt;&lt;/asp:Button&gt;&lt;br /&gt;    &lt;/form&gt;&lt;br /&gt;  &lt;/body&gt;&lt;br /&gt;&lt;/html&gt;&lt;br /&gt;&lt;/code&gt;</description>
      <pubDate>Wed, 23 Nov 2005 21:30:33 GMT</pubDate>
      <guid>http://snippets.dzone.com/posts/show/906</guid>
      <author>ms_michel (Michel)</author>
    </item>
  </channel>
</rss>
