<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss'><id>tag:blogger.com,1999:blog-1644278197692727135</id><updated>2009-10-23T13:04:01.152+02:00</updated><title type='text'>Dotnet4all Code Snippets</title><subtitle type='html'></subtitle><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.dotnet4all.com/snippets/atom.xml'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-2451128560014450597</id><published>2008-12-08T18:59:00.005+01:00</published><updated>2008-12-30T23:03:43.839+01:00</updated><title type='text'>Remove content between HEAD tags using Regex and c#</title><summary type='text'>To remove all content between HEAD-tags from a webpage using Regex and C# use the following code snippet:


        private string RemoveContentBetweenHeadTags(string in_HTML)
        {
            string lv_HTML = in_HTML;

            lv_HTML = Regex.Replace(lv_HTML, "&lt;head.*?&lt;/head&gt;", ""
                      , RegexOptions.Singleline  RegexOptions.IgnoreCase);
              
            </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/2451128560014450597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=2451128560014450597' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2451128560014450597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2451128560014450597'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2008/12/remove-content-between-head-tags-using.html' title='Remove content between HEAD tags using Regex and c#'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-7287039115289089299</id><published>2008-12-08T18:44:00.007+01:00</published><updated>2008-12-08T19:07:17.798+01:00</updated><title type='text'>Strip HTML tags, HEAD content and SCRIPT tags from content using Regex and C#</title><summary type='text'>This code snippet shows how to remove HTML tags, content within HEAD-elements and content within SCRIPT-elements using C# and Regex.

Fill the string 'in_HTML' with a HTML-formatted webpage. The funtion will return a string with the content from that webpage, excluding the Header info and Javascripts. 


        private string RemoveHTML(string in_HTML)
        {
            string lv_HTML = </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/7287039115289089299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=7287039115289089299' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/7287039115289089299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/7287039115289089299'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2008/12/private-string-removehtmlstring-inhtml.html' title='Strip HTML tags, HEAD content and SCRIPT tags from content using Regex and C#'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-8470994176324824058</id><published>2008-04-06T12:34:00.003+02:00</published><updated>2009-06-17T07:10:51.974+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2000'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><category scheme='http://www.blogger.com/atom/ns#' term='Indexes'/><title type='text'>9 Tips for creating indexes in SQL Server</title><summary type='text'>To improve performance in SQL Server the first step is to create indexes on the appropriate table-fields. Below a list of 9 tips when creating indexes.

1) Create indexes on the highly selective colums that are used in the WHERE-clause
2) Create indexes on all columns that are used in the WHERE clause in case OR is used
3) Create at least a clustered index on every table. Generally use the column</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/8470994176324824058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=8470994176324824058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/8470994176324824058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/8470994176324824058'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2008/04/9-tips-for-creating-indexes-in-sql.html' title='9 Tips for creating indexes in SQL Server'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-422081274472110507</id><published>2008-04-06T12:11:00.004+02:00</published><updated>2009-06-17T07:09:51.590+02:00</updated><title type='text'>Performance Tip 1: Avoid non-sargable WHERE-clauses.</title><summary type='text'>Avoid non-sargable WHERE-clauses. If possible rewrite them to sargable ones. 
In case a WHERE-clause is sargable SQL Server can take advantage of an index to speed up the execution of the query. In case it is non-sargable SQL Server can' t.

Sargable operators: 
= (best sargable operator)
&gt;
&lt;
&gt;=
&lt;=
EXIST
IS
IN
BETWEEN
LIKE 'abc%' (least best sargable operator)

Non-sargable operators
IS NULL
&lt;&gt;
!</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/422081274472110507/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=422081274472110507' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/422081274472110507'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/422081274472110507'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2008/04/performance-tip-1-avoid-non-sargable.html' title='Performance Tip 1: Avoid non-sargable WHERE-clauses.'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-544575436672863137</id><published>2008-04-06T12:04:00.005+02:00</published><updated>2009-06-17T07:08:54.897+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='performance'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2000'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>23 Tips to improve the performance of your SQL queries</title><summary type='text'>I've created a list with 23 tips to improve your SQL Server queries. Quite often these tips can also be used for other database-engines like MS Access, Oracle or MySQL.

1) Avoid non-sargable WHERE-clauses. If possible rewrite them to sargable ones
2) In the WHERE-clause use the least likely true AND expression first
3) Avoid using OR in the WHERE-clause if not all colums have an index
4) Avoid </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/544575436672863137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=544575436672863137' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/544575436672863137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/544575436672863137'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2008/04/23-tips-to-improve-performance-of-your.html' title='23 Tips to improve the performance of your SQL queries'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-2754601055717495142</id><published>2008-04-05T21:02:00.015+02:00</published><updated>2009-06-17T07:07:23.368+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Factsheet'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2000'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server'/><title type='text'>A cheat sheet for SQL Server developers</title><summary type='text'>I have created a cheat sheet (factsheet) for SQL Server (6.5, 7.0, 2000 and 2005) developers that fits on one A4 (printed on both sides) so that you can laminate it and keep it on your desk. You have to print it with a color-printer to be able to use all information!
An overview of the contents of this factsheet:- A checklist for writing fast queries
- Sargability of queries
- A checklist for </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/2754601055717495142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=2754601055717495142' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2754601055717495142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2754601055717495142'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2008/04/factsheet-for-sql-server-developers.html' title='A cheat sheet for SQL Server developers'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-4809658266138240699</id><published>2007-05-09T20:10:00.000+02:00</published><updated>2007-05-09T20:45:23.215+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='formatting'/><category scheme='http://www.blogger.com/atom/ns#' term='hyperlink'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>How to replace certain word with a hyperlink using C#</title><summary type='text'>This code shows, using C#, how to build a function that replaces certain word (-combinations)with a hyperlink and returns a HTML formatted string.

public static string InsertHyperLink(string in_Text, string in_TextToHyperLink, string in_HyperLink)
{
  int lv_Pointer = 0;
  while (lv_Pointer &gt; -1 &amp;&amp; lv_Pointer &lt; in_Text.Length)
  {
    lv_Pointer = in_Text.ToLower().IndexOf(</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/4809658266138240699/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=4809658266138240699' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/4809658266138240699'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/4809658266138240699'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/05/how-to-replace-certain-word-with.html' title='How to replace certain word with a hyperlink using C#'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-2226768965137687423</id><published>2007-05-09T19:53:00.000+02:00</published><updated>2007-05-09T20:06:02.797+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='formatting'/><category scheme='http://www.blogger.com/atom/ns#' term='HighLight'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>How to Highlight a specific word in HTML content (C#)</title><summary type='text'>This code snippet shows how to hightlight (or apply a certain style to) a specific word (or combination of words) from a striong in a browser.

public static string HighLight(string in_Text, string in_TextToHighLight, string lv_Style)
{
  int lv_Pointer = 0;

  while (lv_Pointer &gt; -1)
  {
    lv_Pointer = in_Text.ToLower().IndexOf(in_TextToHighLight.ToLower(),lv_Pointer);
    if (lv_Pointer &gt;= 0)</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/2226768965137687423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=2226768965137687423' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2226768965137687423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2226768965137687423'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/05/how-to-highlight-specific-word-in-html.html' title='How to Highlight a specific word in HTML content (C#)'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-6749444953924033346</id><published>2007-04-22T17:12:00.000+02:00</published><updated>2007-04-22T17:21:10.136+02:00</updated><title type='text'>how to extract SRC from IMG elements in HTML code</title><summary type='text'>This piece of code shows how to extract the SRC URL from the IMG element in HTML code, using a regular expression (RegEx). Every match is put into an Array.

public static ArrayList ExtractAllImagesFromHTMLbyURL(string lv_HTML)
{
  ArrayList lv_Images = new ArrayList();

  try
  {
    //Find SRC URL from IMG tag
    Regex lv_FindAllImages = new Regex(@"]*src\s*=\s*[\""\']?(?
    [^""'&gt;\s]*)[\""\'</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/6749444953924033346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=6749444953924033346' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/6749444953924033346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/6749444953924033346'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/04/how-to-extract-src-from-img-elements-in.html' title='how to extract SRC from IMG elements in HTML code'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-7784241956316007183</id><published>2007-04-16T14:39:00.000+02:00</published><updated>2007-04-16T14:40:51.055+02:00</updated><title type='text'>How to extract URL and Anchor from HTML content</title><summary type='text'>This C# snippet shows how to extract URL/Anchor combinations from HTML content and store the URLs in an ArraList.
to achieve this two regular expressions are used.
- One regular expression extracts all URL/Anchor combination from HTML content
- One regular expression check if a string is a qualified URL. (for example not a relative one)

Snippet:
//Define ArrayList in which all URLs will be </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/7784241956316007183/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=7784241956316007183' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/7784241956316007183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/7784241956316007183'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/04/how-to-extract-url-and-anchor-from-html.html' title='How to extract URL and Anchor from HTML content'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-2541240280732787730</id><published>2007-04-16T12:45:00.000+02:00</published><updated>2007-04-22T13:44:02.115+02:00</updated><title type='text'>Grab the content of a (GZIP) webpage using C#</title><summary type='text'>This code snippet demonstrates how to grab the content from a webpage and put it in a string variable. This snippet can be used in several applications like a webcrawler or spider. 

Since Bandwith (most of the times) is an issue I also have added code that enables and handles GZIP/DEFLATE compressed content. Compressed content can save up to 80% of the needed bandwith, since most of the content </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/2541240280732787730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=2541240280732787730' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2541240280732787730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/2541240280732787730'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/04/grab-content-of-gzipdeflate-webpage.html' title='Grab the content of a (GZIP) webpage using C#'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-5304889141194854960</id><published>2007-04-16T12:16:00.000+02:00</published><updated>2007-04-16T13:32:28.091+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expression'/><category scheme='http://www.blogger.com/atom/ns#' term='Domain'/><category scheme='http://www.blogger.com/atom/ns#' term='URL'/><category scheme='http://www.blogger.com/atom/ns#' term='Host'/><title type='text'>How to extract the host name from an URL (C#)</title><summary type='text'>This snippet demonstrates how to extract the host/domain name from a valid URL  using regular expressions.   

  using System.Text.RegularExpressions;

  ...

  public static string ExtractDomainFromURL(string in_URL)
  {
    string regexPattern = @"^(?(?[^:/\?#]+):)?(?" 
                        + @"//(?[^/\?#]*))?(?[^\?#]*)"
                        + @"(?\?(?[^#]*))?" 
                        + </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/5304889141194854960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=5304889141194854960' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/5304889141194854960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/5304889141194854960'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/04/how-to-extract-domain-namehost-from.html' title='How to extract the host name from an URL (C#)'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-1470967599285232658</id><published>2007-04-16T12:10:00.000+02:00</published><updated>2007-04-16T12:21:36.283+02:00</updated><title type='text'>How to Send an email using SMTP (C#)</title><summary type='text'>Sending Email is easy. The only conditions is that you have to have access to an SMTP mailing service.

  using System.Web.Mail;

  ...

  public static void SendF4Mail(string in_Body, string in_Subject, _
                              string in_From, string in_To, string in_Bcc)
  {
    MailMessage lv_Mail = new MailMessage();
    string lv_MySMTPServer = "smtp.xxxxx.xxxx";  //Your SMTP server

</summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/1470967599285232658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=1470967599285232658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/1470967599285232658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/1470967599285232658'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/04/how-to-send-email-using-smtp-c.html' title='How to Send an email using SMTP (C#)'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-8777274927146119599</id><published>2007-04-16T11:56:00.000+02:00</published><updated>2007-04-16T13:36:29.883+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Regular Expression'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>How to remove HTML-tags from web content (C#)</title><summary type='text'>Using webcontent in applications can be very annoying since webcontent usually contains lots of HTML elements. With one simple action, using regular expressions, all of these HTML elements can be removed from the content. What's left is a clean string, without HTML formatting.

Snippet:
  using System.Text.RegularExpressions;

  ...

  public static string RemoveHTML(string in_HTML)
    {
      </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/8777274927146119599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=8777274927146119599' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/8777274927146119599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/8777274927146119599'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/04/how-to-remove-html-tags-from-web.html' title='How to remove HTML-tags from web content (C#)'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1644278197692727135.post-810586749539325420</id><published>2007-04-16T11:40:00.000+02:00</published><updated>2007-04-16T12:09:25.431+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Convert'/><category scheme='http://www.blogger.com/atom/ns#' term='DateTime'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>How to convert DateTime to SQL valid string</title><summary type='text'>Using DateTime-fields in an SQL string is not difficult. Therefore the DateTime format must be 'YYYY-MM-DD HH:mm'. 
For Example:
  "Select * from MyTable Where MyDateTimeField &gt; '2007-01-01 12:00'"
For converting a .NET DateTime object to a valid SQL-compliant string using C# the following code snippet can be used:
  public static string ConverteerDatum(DateTime in_Datum)
  {
    return = </summary><link rel='replies' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/810586749539325420/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='https://www.blogger.com/comment.g?blogID=1644278197692727135&amp;postID=810586749539325420' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/810586749539325420'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1644278197692727135/posts/default/810586749539325420'/><link rel='alternate' type='text/html' href='http://www.dotnet4all.com/snippets/2007/04/how-to-convert-datetime-to-sql-mysql-or.html' title='How to convert DateTime to SQL valid string'/><author><name>XanderZe</name><uri>http://www.blogger.com/profile/11484871454554231807</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='09736701099269490445'/></author><thr:total xmlns:thr='http://purl.org/syndication/thread/1.0'>0</thr:total></entry></feed>