<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>CodeKeep ASP.NET Feed</title>
    <description>The latest and greatest ASP.NET code snippets publicly available</description>
    <link>http://www.codekeep.net/feeds.aspx</link>
    <lastBuildDate>Mon, 15 Mar 2010 09:34:56 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>RSS.NET: http://www.rssdotnet.com/</generator>
    <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/CodeKeepASPNET" /><feedburner:info uri="codekeepaspnet" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
      <title>Rob Conery's ASP.Net Mvc Helpers</title>
      <description>Description: useful blog from Rob Conery&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/75a2dce0-c6c1-4118-a740-ee9dc95638ec.aspx'&gt;http://www.codekeep.net/snippets/75a2dce0-c6c1-4118-a740-ee9dc95638ec.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;http://blog.wekeroad.com/2010/01/20/my-favorite-helpers-for-aspnet-mvc?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed:+wekeroad/EeKc+(Rob+Conery)&amp;amp;utm_content=Google+Reader&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/s8b3eBcuwlY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/s8b3eBcuwlY/75a2dce0-c6c1-4118-a740-ee9dc95638ec.aspx</link>
      <pubDate>Mon, 15 Mar 2010 09:34:56 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/75a2dce0-c6c1-4118-a740-ee9dc95638ec.aspx</feedburner:origLink></item>
    <item>
      <title>Asp.Net Mvc RenderPartialToString</title>
      <description>Description: Renders a partial view to a string&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/0d72a833-7b8f-43d8-9b26-3e16deecca50.aspx'&gt;http://www.codekeep.net/snippets/0d72a833-7b8f-43d8-9b26-3e16deecca50.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;       public static string RenderPartialToString(string controlName, object viewData)
       {
           ViewDataDictionary vd = new ViewDataDictionary(viewData);
           ViewPage vp = new ViewPage { ViewData = vd };
           Control control = vp.LoadControl(controlName);

           vp.Controls.Add(control);

           StringBuilder sb = new StringBuilder();
           using (StringWriter sw = new StringWriter(sb))
           {
               using (HtmlTextWriter tw = new HtmlTextWriter(sw))
               {
                   vp.RenderControl(tw);
               }
           }

           return sb.ToString();
       }&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/fp3Nm4po5DQ" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/fp3Nm4po5DQ/0d72a833-7b8f-43d8-9b26-3e16deecca50.aspx</link>
      <pubDate>Tue, 09 Mar 2010 14:18:31 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/0d72a833-7b8f-43d8-9b26-3e16deecca50.aspx</feedburner:origLink></item>
    <item>
      <title>Asp.Net Mvc BeginMultipartForm</title>
      <description>Description: Extends HtmlHelper with a BeginMultipartForm method for file uploads&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/e52f3d6d-0ea0-4a7e-a6b6-65c9c5815d0d.aspx'&gt;http://www.codekeep.net/snippets/e52f3d6d-0ea0-4a7e-a6b6-65c9c5815d0d.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;       public static MvcForm BeginMultipartForm(this HtmlHelper htmlHelper, string actionName, string controllerName, RouteValueDictionary routeValues)
       {
           var dict = new Dictionary&amp;lt;string, object&amp;gt; { { &amp;quot;enctype&amp;quot;, &amp;quot;multipart/form-data&amp;quot; } };
           return htmlHelper.BeginForm(actionName, controllerName, routeValues,FormMethod.Post,dict);
       }&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/dJWnIqF_DUs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/dJWnIqF_DUs/e52f3d6d-0ea0-4a7e-a6b6-65c9c5815d0d.aspx</link>
      <pubDate>Tue, 09 Mar 2010 14:11:56 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/e52f3d6d-0ea0-4a7e-a6b6-65c9c5815d0d.aspx</feedburner:origLink></item>
    <item>
      <title>ASP.Net Mvc BeginFormWithId</title>
      <description>Description: Extends HtmlHelper with a BeginFormWithId method&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/51f58bba-5963-4bbd-b3dc-7e653f6c5d74.aspx'&gt;http://www.codekeep.net/snippets/51f58bba-5963-4bbd-b3dc-7e653f6c5d74.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;namespace System.Web.Mvc.Html
{
    public static class HtmlHelpers
    {       

       public static MvcForm BeginFormWithId(this HtmlHelper htmlHelper, string id, string actionName, string controllerName)
       {
           var dict = new Dictionary&amp;lt;string, object&amp;gt; {{&amp;quot;id&amp;quot;, id}};
           return htmlHelper.BeginForm(actionName, controllerName, FormMethod.Post, dict);
       }
    }
}&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/m5v8efix1v8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/m5v8efix1v8/51f58bba-5963-4bbd-b3dc-7e653f6c5d74.aspx</link>
      <pubDate>Tue, 09 Mar 2010 14:06:52 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/51f58bba-5963-4bbd-b3dc-7e653f6c5d74.aspx</feedburner:origLink></item>
    <item>
      <title>ASP.Net Mvc Create TextboxWithClass</title>
      <description>Description: Extends HtmlHelper to add TextboxWithClass with creates a text box with a class name&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/8b77a53c-39da-46c3-a01a-a528ce6ef913.aspx'&gt;http://www.codekeep.net/snippets/8b77a53c-39da-46c3-a01a-a528ce6ef913.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;       public static string TextBoxWithClass(this HtmlHelper htmlHelper, string name, string className)
       {
           var dict = new Dictionary&amp;lt;string, object&amp;gt;();
           dict.Add(&amp;quot;class&amp;quot;,className);
           return htmlHelper.TextBox(name, null, dict);
       }&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/UQwVk56Tfw4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/UQwVk56Tfw4/8b77a53c-39da-46c3-a01a-a528ce6ef913.aspx</link>
      <pubDate>Tue, 09 Mar 2010 13:44:19 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/8b77a53c-39da-46c3-a01a-a528ce6ef913.aspx</feedburner:origLink></item>
    <item>
      <title>Download file</title>
      <description>Description: send files to download by type&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/dbbe8d77-1e66-4f6b-b6b8-a29ba15bf718.aspx'&gt;http://www.codekeep.net/snippets/dbbe8d77-1e66-4f6b-b6b8-a29ba15bf718.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;public void DownLoadFile(string strFileName)
{
    
    string strFullPath = ((Page)HttpContext.Current.Handler).Server.MapPath(strFileName);
    
    string strNameForDownload = System.IO.Path.GetFileName(strFullPath);
    
    
    {
        switch (System.IO.Path.GetExtension(strFullPath)) {
            case &amp;quot;.htm&amp;quot;:
            case &amp;quot;.html&amp;quot;:
                ((Page)HttpContext.Current.Handler).Response.ContentType = &amp;quot;text/HTML&amp;quot;;
                break;
            case &amp;quot;.txt&amp;quot;:
                ((Page)HttpContext.Current.Handler).Response.ContentType = &amp;quot;text/plain&amp;quot;;
                break;
            case &amp;quot;.doc&amp;quot;:
            case &amp;quot;.rtf&amp;quot;:
                ((Page)HttpContext.Current.Handler).Response.ContentType = &amp;quot;Application/msword&amp;quot;;
                break;
            case &amp;quot;.csv&amp;quot;:
            case &amp;quot;.xls&amp;quot;:
                ((Page)HttpContext.Current.Handler).Response.ContentType = &amp;quot;Application/x-msexcel&amp;quot;;
                break;
            default:
                ((Page)HttpContext.Current.Handler).Response.ContentType = &amp;quot;application/x-msdownload&amp;quot;;
                break;
        }
        
        ((Page)HttpContext.Current.Handler).Response.AddHeader(&amp;quot;Content-Disposition&amp;quot;, &amp;quot;attachment; filename=&amp;quot; + strNameForDownload);
        ((Page)HttpContext.Current.Handler).Response.WriteFile(strFullPath);
            
        ((Page)HttpContext.Current.Handler).Response.End();
        
    }
}
 &lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/I7GlDr2ekv8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/I7GlDr2ekv8/dbbe8d77-1e66-4f6b-b6b8-a29ba15bf718.aspx</link>
      <pubDate>Wed, 10 Feb 2010 13:39:59 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/dbbe8d77-1e66-4f6b-b6b8-a29ba15bf718.aspx</feedburner:origLink></item>
    <item>
      <title>DevExpressComboBox</title>
      <description>Description: DevExpressComboBox&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/2dd7facf-8926-460b-bc34-ec762335ff17.aspx'&gt;http://www.codekeep.net/snippets/2dd7facf-8926-460b-bc34-ec762335ff17.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;1.object objValue = &amp;quot;0&amp;quot;;
   ComboBox1.Items.Add(&amp;quot;All DeliveryAreas&amp;quot;, objValue);
   ComboBox1.SelectedIndex = cmbAllDelAreas.Items.FindByText(&amp;quot;All DeliveryAreas&amp;quot;).Index;

2.  ComboBox1.Items.FindByText(Obj.JobTitle.ToString()).Selected = true;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/T5JBN2QkfRY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/T5JBN2QkfRY/2dd7facf-8926-460b-bc34-ec762335ff17.aspx</link>
      <pubDate>Tue, 09 Feb 2010 17:45:06 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/2dd7facf-8926-460b-bc34-ec762335ff17.aspx</feedburner:origLink></item>
    <item>
      <title>Add a 'back' link to an ASP.NET MVC application</title>
      <description>Description: Simple reference back to the previous page.&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/c674ed49-acc4-4f23-a310-f1c80667d474.aspx'&gt;http://www.codekeep.net/snippets/c674ed49-acc4-4f23-a310-f1c80667d474.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;&amp;lt;a href=&amp;quot;&amp;lt;%= Request.UrlReferrer %&amp;gt;&amp;quot;&amp;gt;Back&amp;lt;/a&amp;gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/3nz2A5UESl4" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/3nz2A5UESl4/c674ed49-acc4-4f23-a310-f1c80667d474.aspx</link>
      <pubDate>Wed, 03 Feb 2010 13:44:48 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/c674ed49-acc4-4f23-a310-f1c80667d474.aspx</feedburner:origLink></item>
    <item>
      <title>DateTime Viewstate Property</title>
      <description>Description: public property to store and retrieve a DateTime object to and from viewstate&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/c7f53c2b-bd0a-47c8-a585-bbba95a52360.aspx'&gt;http://www.codekeep.net/snippets/c7f53c2b-bd0a-47c8-a585-bbba95a52360.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;public DateTime date
{
get
{
object o = ViewState[&amp;quot;&amp;quot;];      
return o == null ? DateTime.Now : (DateTime)(o);        
}
set
{
ViewState[&amp;quot;&amp;quot;] = value;
}
}&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/Pdtb6IdpGdc" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/Pdtb6IdpGdc/c7f53c2b-bd0a-47c8-a585-bbba95a52360.aspx</link>
      <pubDate>Wed, 03 Feb 2010 08:09:00 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/c7f53c2b-bd0a-47c8-a585-bbba95a52360.aspx</feedburner:origLink></item>
    <item>
      <title>Refresh the parent page from child page </title>
      <description>Description: Refresh the parent page from child page &lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/cfb54974-a8cc-40fc-9e00-877714608427.aspx'&gt;http://www.codekeep.net/snippets/cfb54974-a8cc-40fc-9e00-877714608427.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;***** Method 1 Start*****

window.opener.location.reload(); //This Code prompt retry/cancel in parent page reload

***** Method 1 End*****



***** Method 2 Start*****

window.opener.location.href = window.opener.location; //The parent page will be refreshed without the prompt

***** Method 2 End*****
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/GpM5etck1FY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/GpM5etck1FY/cfb54974-a8cc-40fc-9e00-877714608427.aspx</link>
      <pubDate>Tue, 02 Feb 2010 08:39:17 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/cfb54974-a8cc-40fc-9e00-877714608427.aspx</feedburner:origLink></item>
    <item>
      <title>Increase the connection limit in IIS - WinXP</title>
      <description>Description: Windows XP Professional runs IIS version 5.1, which comes with a 10 connection limit. Often that's not enough when you are testing a site from multiple browsers (or multiple locations). You can easily increase the limit to the hardcoded maximum: 40 connec&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/ab152aa4-5ff6-4d81-9686-a0825ba488e1.aspx'&gt;http://www.codekeep.net/snippets/ab152aa4-5ff6-4d81-9686-a0825ba488e1.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Make a command prompt window (start, run, cnd.exe) and issue these commands.
 1. cd \inetpub\adminscripts  
 2. cscript adsutil.vbs set w3svc/MaxConnections 40  
 3. iisreset  &lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/cSYlZbQEmdw" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/cSYlZbQEmdw/ab152aa4-5ff6-4d81-9686-a0825ba488e1.aspx</link>
      <pubDate>Mon, 04 Jan 2010 12:51:50 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/ab152aa4-5ff6-4d81-9686-a0825ba488e1.aspx</feedburner:origLink></item>
    <item>
      <title>Nested object collections in a DataGrid</title>
      <description>Description: Expose the properties of a nested object in a data grid.&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/70733ca3-0488-4acb-b95f-1e02c0a2cfca.aspx'&gt;http://www.codekeep.net/snippets/70733ca3-0488-4acb-b95f-1e02c0a2cfca.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;&amp;lt;asp:BoundColumn DataField=&amp;quot;Name&amp;quot; HeaderText=&amp;quot;Name&amp;quot;&amp;gt;&amp;lt;/asp:BoundColumn&amp;gt;

&amp;lt;asp:TemplateColumn HeaderText=&amp;quot;PropA&amp;quot;&amp;gt;
    &amp;lt;ItemTemplate&amp;gt; 
        &amp;lt;%#DataBinder.Eval(Container.DataItem, &amp;quot;nbo.PropA&amp;quot;)%&amp;gt;
    &amp;lt;/ItemTemplate&amp;gt;
&amp;lt;/asp:TemplateColumn&amp;gt;

&amp;lt;asp:TemplateColumn HeaderText=&amp;quot;PropB&amp;quot;&amp;gt;
    &amp;lt;ItemTemplate&amp;gt; 
        &amp;lt;%#DataBinder.Eval(Container.DataItem, &amp;quot;nbo.PropB&amp;quot;)%&amp;gt;
    &amp;lt;/ItemTemplate&amp;gt;
&amp;lt;/asp:TemplateColumn&amp;gt;

&amp;lt;asp:TemplateColumn HeaderText=&amp;quot;PropC&amp;quot;&amp;gt;
    &amp;lt;ItemTemplate&amp;gt; 
        &amp;lt;%#DataBinder.Eval(Container.DataItem, &amp;quot;nbo.PropC&amp;quot;)%&amp;gt;
    &amp;lt;/ItemTemplate&amp;gt;
&amp;lt;/asp:TemplateColumn&amp;gt;
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/1Tt5wKYj2ks" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/1Tt5wKYj2ks/70733ca3-0488-4acb-b95f-1e02c0a2cfca.aspx</link>
      <pubDate>Thu, 31 Dec 2009 17:27:12 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/70733ca3-0488-4acb-b95f-1e02c0a2cfca.aspx</feedburner:origLink></item>
    <item>
      <title>Password Strength Regular Expression</title>
      <description>Description: Minimum of 14 characters
Atleast one upper case alphabet
Ateast one lowercase alphabet
Atleast one special character e.g (* &amp; # $ % @ ( ) { [ ? &gt; )
Atleast one number&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/fbc28e2a-0688-47e3-b427-3d1cda5aa5a7.aspx'&gt;http://www.codekeep.net/snippets/fbc28e2a-0688-47e3-b427-3d1cda5aa5a7.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;&amp;lt;asp:RegularExpressionValidator ID=&amp;quot;RegularExpressionValidator2&amp;quot; ControlToValidate=&amp;quot;txtNewPassword&amp;quot;
                            ValidationExpression=&amp;quot;(?=^.{14,30}$)(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&amp;amp;amp;*()_+}{&amp;amp;quot;&amp;amp;quot;:;'?/&amp;amp;gt;.&amp;amp;lt;,]).*$&amp;quot;
                            runat=&amp;quot;server&amp;quot; Display=&amp;quot;Dynamic&amp;quot; ErrorMessage=&amp;quot;Password dos not confirm to rules&amp;quot;&amp;gt;&amp;lt;/asp:RegularExpressionValidator&amp;gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/ccDZdS3wTlM" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/ccDZdS3wTlM/fbc28e2a-0688-47e3-b427-3d1cda5aa5a7.aspx</link>
      <pubDate>Wed, 30 Dec 2009 20:07:17 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/fbc28e2a-0688-47e3-b427-3d1cda5aa5a7.aspx</feedburner:origLink></item>
    <item>
      <title>Navigation using generics</title>
      <description>Description: navigation using generics in asp.net C#&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/4b34f6eb-6227-44e4-a354-74f45cfb1f17.aspx'&gt;http://www.codekeep.net/snippets/4b34f6eb-6227-44e4-a354-74f45cfb1f17.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;&amp;lt;div class=&amp;quot;rightMenu1&amp;quot;&amp;gt;
     &amp;lt;ul&amp;gt;
     &amp;lt;% foreach (var item in (List&amp;lt;Service&amp;gt;)ViewData[&amp;quot;List&amp;quot;])
       {%&amp;gt;
            &amp;lt;% if ((item.isActive) || (item.id != 0)) 
                   { %&amp;gt;&amp;lt;li&amp;gt;&amp;lt;%=Html.ActionLink(item.Title, &amp;quot;Details&amp;quot;, new { id = item.id })%&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;%} %&amp;gt;
       &amp;lt;%} %&amp;gt;
    &amp;lt;/ul&amp;gt;
    &amp;lt;/div&amp;gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/yNqgMxr9KMI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/yNqgMxr9KMI/4b34f6eb-6227-44e4-a354-74f45cfb1f17.aspx</link>
      <pubDate>Wed, 30 Dec 2009 06:21:06 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/4b34f6eb-6227-44e4-a354-74f45cfb1f17.aspx</feedburner:origLink></item>
    <item>
      <title>SubLinkMasterPage</title>
      <description>Description: Master Page Content&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/53f29922-2c0e-44c0-8ae1-17a70475413b.aspx'&gt;http://www.codekeep.net/snippets/53f29922-2c0e-44c0-8ae1-17a70475413b.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;&amp;lt;asp:Content ID=&amp;quot;TitleContent&amp;quot; ContentPlaceHolderID=&amp;quot;Title&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;

&amp;lt;/asp:Content&amp;gt;

&amp;lt;asp:Content ID=&amp;quot;HeadContent&amp;quot; ContentPlaceHolderID=&amp;quot;Head&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;

&amp;lt;/asp:Content&amp;gt;

&amp;lt;asp:Content ID=&amp;quot;SubLinksContent&amp;quot; ContentPlaceHolderID=&amp;quot;SubLinks&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;

&amp;lt;/asp:Content&amp;gt;

&amp;lt;asp:Content ID=&amp;quot;ValidationSummaryContent&amp;quot; ContentPlaceHolderID=&amp;quot;ValidationSummary&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
    &amp;lt;%= Html.ValidationSummary(&amp;quot;Create was unsuccessful. Please correct the errors and try again.&amp;quot;) %&amp;gt;
&amp;lt;/asp:Content&amp;gt;

&amp;lt;asp:Content ID=&amp;quot;SubContentContent&amp;quot; ContentPlaceHolderID=&amp;quot;SubContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;

&amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/Tj5NSYZhBz8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/Tj5NSYZhBz8/53f29922-2c0e-44c0-8ae1-17a70475413b.aspx</link>
      <pubDate>Tue, 08 Dec 2009 02:47:22 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/53f29922-2c0e-44c0-8ae1-17a70475413b.aspx</feedburner:origLink></item>
    <item>
      <title>System.Diagnostics XML config for a TextWriterTraceListener</title>
      <description>Description: Simple web.config xml to set up a trace file listener.&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/dbef1300-44bd-4490-8791-21a1d5cd2848.aspx'&gt;http://www.codekeep.net/snippets/dbef1300-44bd-4490-8791-21a1d5cd2848.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;&amp;lt;system.diagnostics&amp;gt;
  &amp;lt;trace autoflush=&amp;quot;false&amp;quot;
         indentsize=&amp;quot;4&amp;quot;&amp;gt;
    &amp;lt;listeners&amp;gt;
      &amp;lt;add name=&amp;quot;myListener&amp;quot;
           type=&amp;quot;System.Diagnostics.TextWriterTraceListener&amp;quot;
           initializeData=&amp;quot;C:\LOG_FILE_NAME.log&amp;quot; /&amp;gt;
      &amp;lt;remove name=&amp;quot;Default&amp;quot; /&amp;gt;
    &amp;lt;/listeners&amp;gt;
  &amp;lt;/trace&amp;gt;
&amp;lt;/system.diagnostics&amp;gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/gqIzjk2Ebr8" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/gqIzjk2Ebr8/dbef1300-44bd-4490-8791-21a1d5cd2848.aspx</link>
      <pubDate>Thu, 19 Nov 2009 17:37:10 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/dbef1300-44bd-4490-8791-21a1d5cd2848.aspx</feedburner:origLink></item>
    <item>
      <title>Unable to install .NET Framework 3.0 / 3.5 / VS2008 Solution</title>
      <description>Description: Solution for .NET Framework 3.0 / 3.5 / VS2008 install or setup errors&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/7b877447-c2bc-4046-b222-b12c09746e5c.aspx'&gt;http://www.codekeep.net/snippets/7b877447-c2bc-4046-b222-b12c09746e5c.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;--------Possible Solution 1-------
No aceess to the below registry key
(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security\ServiceModel 3.0.0.0)

1) Open the registry editor
   Click Start button in windows --&amp;gt; Run
   then enter &amp;quot;regedit&amp;quot; (without quotes). 
2) Navigate down to the node by opening 
   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security\ServiceModel 3.0.0.0     
   each node in the hierarchy. 
3) Right click on the node (ServiceModel 3.0.0.0) and select Permissions 
   Click on Add, then enter &amp;quot;everyone&amp;quot; 
   (no quotes) on the 'Select Users, 
   Computers or Groups' dialog then 
   click OK. Give full permissions for &amp;quot;SYSTEM&amp;quot; and &amp;quot;ADMINISTRATORS&amp;quot; too
4) Back on the 'Permissions for 
   ServiceModel 3.0.0.0' dialog select 
   the user group Everyone, then make 
   sure the Full Control checkbox has a 
   tick, then click OK. Repeat the above for &amp;quot;SYSTEM&amp;quot; and &amp;quot;ADMINISTRATORS&amp;quot;
5) Run the setup for Framework 3.0 / 3.5 /
   VS2008 again

--------Possible Solution 2-------
If the above didnt work, then uninstall IIS
and again reinstall IIS. Then Run the setup for Framework 3.0 / 3.5 /
VS2008 again

--------Possible Solution 3-------
If none of the above worked, then follow
the instructions in the below links
http://msdn.microsoft.com/en-us/netframework/bb188202.aspx
http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/0376db8f-4761-4ae5-9af2-98c53216318a
&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/0p5ZqG9xWgY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/0p5ZqG9xWgY/7b877447-c2bc-4046-b222-b12c09746e5c.aspx</link>
      <pubDate>Fri, 06 Nov 2009 05:03:00 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/7b877447-c2bc-4046-b222-b12c09746e5c.aspx</feedburner:origLink></item>
    <item>
      <title>Visual Studio : How to map a Visual Studio macro to a keyboard shortcut?</title>
      <description>Description: The complete answer is here: http://msdn.microsoft.com/en-us/library/a0003t62.aspx&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/3e3bdd60-1b65-4b23-a4f2-3c0a708b217c.aspx'&gt;http://www.codekeep.net/snippets/3e3bdd60-1b65-4b23-a4f2-3c0a708b217c.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;   1.  Choose Options on the Tools menu to display the Options dialog box.
   2. In the Environment folder, click Keyboard.
   3. In the Show commands containing box, type &amp;quot;macros.&amp;quot; Once you do this, all commands beginning with the word &amp;quot;macros&amp;quot; appear in the commands list.
   4. Scroll down the list to your macro.
   5. Click the Press shortcut key(s) box type a key combination, such as CTRL+SHIFT+ALT+A. This will be the keyboard shortcut that executes the macro. You can use a different key sequence if you prefer.
   6. Click Assign and then click OK. Your macro is now bound to that keyboard shortcut.


SOURCE FROM :

http://blogs.msdn.com/kirillosenkov/archive/2008/05/02/how-to-map-a-visual-studio-macro-to-a-keyboard-shortcut.aspx&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/kG0WAHlw0Io" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/kG0WAHlw0Io/3e3bdd60-1b65-4b23-a4f2-3c0a708b217c.aspx</link>
      <pubDate>Wed, 07 Oct 2009 06:56:28 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/3e3bdd60-1b65-4b23-a4f2-3c0a708b217c.aspx</feedburner:origLink></item>
    <item>
      <title>Ajax Installer</title>
      <description>Description: This will install the ajax &lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/f76f5c6b-2c29-4a33-a1a6-9cb67007a1a0.aspx'&gt;http://www.codekeep.net/snippets/f76f5c6b-2c29-4a33-a1a6-9cb67007a1a0.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;    http://www.microsoft.com/downloads/thankyou.aspx?familyId=ca9d90fa-e8c9-42e3-aa19-08e2c027f5d6&amp;amp;displayLang=en&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/ZLgml8BJCFs" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/ZLgml8BJCFs/f76f5c6b-2c29-4a33-a1a6-9cb67007a1a0.aspx</link>
      <pubDate>Thu, 01 Oct 2009 10:50:50 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/f76f5c6b-2c29-4a33-a1a6-9cb67007a1a0.aspx</feedburner:origLink></item>
    <item>
      <title>fix timeout issue</title>
      <description>Description: fix the timeout problem if SQL takes more than 30 seconds to reponse

&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/d62043f8-cc84-4aaf-a275-fa9efac81e57.aspx'&gt;http://www.codekeep.net/snippets/d62043f8-cc84-4aaf-a275-fa9efac81e57.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;protected void SqlDataSource1_Selecting(object sender,SqlDataSourceSelectingEventArgs e)
{
e.Command.CommandTimeout = 0; //never ned
}


&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/itNZCsvDs4w" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/itNZCsvDs4w/d62043f8-cc84-4aaf-a275-fa9efac81e57.aspx</link>
      <pubDate>Tue, 29 Sep 2009 03:00:08 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/d62043f8-cc84-4aaf-a275-fa9efac81e57.aspx</feedburner:origLink></item>
    <item>
      <title>Get Logged in user name and convert to proper case</title>
      <description>Description: as above&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/4236c114-8ac9-4145-971b-ffabbc5a4c26.aspx'&gt;http://www.codekeep.net/snippets/4236c114-8ac9-4145-971b-ffabbc5a4c26.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Dim getname As String = Page.User.Identity.Name
getname = StrConv(getname, VbStrConv.ProperCase)&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/ijb-WAa1X9A" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/ijb-WAa1X9A/4236c114-8ac9-4145-971b-ffabbc5a4c26.aspx</link>
      <pubDate>Tue, 22 Sep 2009 10:31:39 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/4236c114-8ac9-4145-971b-ffabbc5a4c26.aspx</feedburner:origLink></item>
    <item>
      <title>Add empty record to databound Combobox</title>
      <description>Description: DevExpress, ASPxComboBox, DataSource, Unbound Items&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/fa34580d-6572-4c48-bd99-54c18e92752a.aspx'&gt;http://www.codekeep.net/snippets/fa34580d-6572-4c48-bd99-54c18e92752a.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;TextField=&amp;quot;text&amp;quot;
ValueField=&amp;quot;id&amp;quot;
ClientSideEvents-Init=&amp;quot;function(s, e) {	
 if (s.GetItem(0).value != 0) {                 
     s.InsertItem(0,'',0);
     }
}&amp;quot;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/WWi2C5ewvhY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/WWi2C5ewvhY/fa34580d-6572-4c48-bd99-54c18e92752a.aspx</link>
      <pubDate>Fri, 18 Sep 2009 12:40:54 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/fa34580d-6572-4c48-bd99-54c18e92752a.aspx</feedburner:origLink></item>
    <item>
      <title>Create Instance of ASPx Page</title>
      <description>Description: Allows you to create and instance of an ASPx page programatically. None of the page life cycle events are hooked up so no need to worry about the overhead.&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/813e4dcd-eaad-429b-95ca-6fae89536495.aspx'&gt;http://www.codekeep.net/snippets/813e4dcd-eaad-429b-95ca-6fae89536495.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;BuildManager.CreateInstanceFromVirtualPath(&amp;quot;~/DrugCompare.aspx&amp;quot;, typeof(Page))&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/zSgT05O6sdY" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/zSgT05O6sdY/813e4dcd-eaad-429b-95ca-6fae89536495.aspx</link>
      <pubDate>Wed, 16 Sep 2009 00:56:28 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/813e4dcd-eaad-429b-95ca-6fae89536495.aspx</feedburner:origLink></item>
    <item>
      <title>pass parameters to the user control from web aspx</title>
      <description>Description: pass the parameters to UC&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/018d0858-d0b9-4c0b-8629-d374b93fe519.aspx'&gt;http://www.codekeep.net/snippets/018d0858-d0b9-4c0b-8629-d374b93fe519.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;*.cs

    private string siteName;
    public string SiteName { get { return siteName; } set { siteName = value; } }


*.aspx
    &amp;lt;asp:Panel ID=&amp;quot;Panel1&amp;quot; runat=&amp;quot;server&amp;quot; BackColor=&amp;quot;#ffffff&amp;quot; Width=&amp;quot;1024px&amp;quot;&amp;gt;&amp;lt;uc1:WUC_item ID=&amp;quot;WUC_item1&amp;quot; runat=&amp;quot;server&amp;quot; SiteName=&amp;quot;WAILUA1&amp;quot;/&amp;gt;
    &amp;lt;/asp:Panel&amp;gt;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/Tx1cqo-tGtI" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/Tx1cqo-tGtI/018d0858-d0b9-4c0b-8629-d374b93fe519.aspx</link>
      <pubDate>Fri, 21 Aug 2009 00:17:53 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/018d0858-d0b9-4c0b-8629-d374b93fe519.aspx</feedburner:origLink></item>
    <item>
      <title>Get the Name of the Executing ASP.NET Page</title>
      <description>Description: Get the Name of the Executing ASP.NET Page
http://www.devx.com/tips/Tip/42433&lt;br /&gt;&lt;br /&gt;Link: &lt;a href='http://www.codekeep.net/snippets/0257e761-dc99-4304-af83-f9241c8cb26f.aspx'&gt;http://www.codekeep.net/snippets/0257e761-dc99-4304-af83-f9241c8cb26f.aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style='font-size: 9pt;'&gt;Get the Name of the Executing ASP.NET Page
You can use the following server-side code to get the name of the 
currently executing ASP.NET page (e.g. default.aspx, hello.aspx).

string sPagePath = System.Web.HttpContext.Current.Request.Url.AbsolutePath;
System.IO.FileInfo oFileInfo = new System.IO.FileInfo(sPagePath);
string sPageName = oInfo.Name;&lt;/pre&gt;&lt;img src="http://feeds.feedburner.com/~r/CodeKeepASPNET/~4/NDWxdhn-p2s" height="1" width="1"/&gt;</description>
      <link>http://feedproxy.google.com/~r/CodeKeepASPNET/~3/NDWxdhn-p2s/0257e761-dc99-4304-af83-f9241c8cb26f.aspx</link>
      <pubDate>Thu, 20 Aug 2009 23:21:58 GMT</pubDate>
    <feedburner:origLink>http://www.codekeep.net/snippets/0257e761-dc99-4304-af83-f9241c8cb26f.aspx</feedburner:origLink></item>
  </channel>
</rss>
