﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>ASP.Net</title>
    <description>ASP.Net</description>
    <link>http://elegantsoftwaresolutions.com/Blogs/tabid/816/BlogId/6/Default.aspx</link>
    <language>en-US</language>
    <managingEditor>tom.hundley@elegantsoftwaresolutions.com</managingEditor>
    <webMaster>tom.hundley@elegantsoftwaresolutions.com</webMaster>
    <pubDate>Wed, 10 Mar 2010 09:09:29 GMT</pubDate>
    <lastBuildDate>Wed, 10 Mar 2010 09:09:29 GMT</lastBuildDate>
    <docs>http://backend.userland.com/rss</docs>
    <generator>Blog RSS Generator Version 3.5.1.19887</generator>
    <item>
      <title>Removing Horizontal Scroll from Telerik RadComboBox</title>
      <description>&lt;p&gt;If you have a rad combo box and the dropdown width is larger than the width, you'll get the annoying horizontal scroll bars.  You can fix this in css by using the "!important" tag.  Thanks to Telerik support for this fix:&lt;/p&gt;
&lt;p&gt;.rcbScroll&lt;br /&gt;
{&lt;br /&gt;
    overflow-y: auto;&lt;br /&gt;
    overflow-x: hidden !important;&lt;br /&gt;
} &lt;/p&gt;
&lt;p&gt;Tom Hundley&lt;br /&gt;
Elegant Software Solutions, LLC&lt;/p&gt;
&lt;p&gt;Reference:&lt;br /&gt;
&lt;a href="http://www.telerik.com/community/forums/aspnet-ajax/combobox/horizontal-scroll-problem.aspx"&gt;http://www.telerik.com/community/forums/aspnet-ajax/combobox/horizontal-scroll-problem.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <link>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=44</link>
      <author>tom.hundley@elegantsoftwaresolutions.com</author>
      <comments>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=44#Comments</comments>
      <guid isPermaLink="true">http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=44</guid>
      <pubDate>Sun, 14 Jun 2009 00:54:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://elegantsoftwaresolutions.com/DesktopModules/Blog/Trackback.aspx?id=44</trackback:ping>
    </item>
    <item>
      <title>Removing a Column from Telerik RadGrid at Runtime</title>
      <description>&lt;p&gt;If you need to remove a column from a Telerik RadGrid at runtime, subscribe to the grid's DataBound event, find the column by its unique name, and set its display property to false.  This is the correct way to do this without breaking the filter functionality.  For a long time I was subscribing to the grid's ItemDataBound event and hiding each dataitem for the column- only now did I realize that the filter was broken by doing it that way.&lt;/p&gt;
&lt;p&gt;Example&lt;/p&gt;
&lt;p&gt;    protected void rgPartDispositionHistory_DataBound(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        rgPartDispositionHistory.MasterTableView.Columns.FindByUniqueName("PeopleSoftId").Display = isTwtc;&lt;br /&gt;
    }&lt;/p&gt;
&lt;p&gt;Tom Hundley&lt;br /&gt;
Elegant Software Solutions&lt;/p&gt;</description>
      <link>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=38</link>
      <author>tom.hundley@elegantsoftwaresolutions.com</author>
      <comments>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=38#Comments</comments>
      <guid isPermaLink="true">http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=38</guid>
      <pubDate>Sat, 08 Nov 2008 02:38:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://elegantsoftwaresolutions.com/DesktopModules/Blog/Trackback.aspx?id=38</trackback:ping>
    </item>
    <item>
      <title>ASP.Net Password Complexity RegEx</title>
      <description>&lt;p&gt;The "out of the box" password complexity requirements for the ASP.Net Membership system is this:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;7 characters minimum&lt;/li&gt;
    &lt;li&gt;1 symbol character&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;A client asked for a more complex password (a common request):&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;8 characters minimum&lt;/li&gt;
    &lt;li&gt;at least 1 number&lt;/li&gt;
    &lt;li&gt;at least 1 lower case&lt;/li&gt;
    &lt;li&gt;at least 1 upper case&lt;/li&gt;
    &lt;li&gt;at least 1 symbol character&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I tested a lot of regular expressions and most of them didn't work.  I finally found one that works well:&lt;/p&gt;
&lt;p&gt;^.*(?=.{8,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[\W]).*$&lt;/p&gt;
&lt;p&gt;Simply set the "passwordStrengthRegularExpression" attribute of the provider section in the web.confg to this regular expression and badda bing, you're good to go.  See this &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms998347.aspx"&gt;link&lt;/a&gt; for a list of all the attributes in the config.&lt;/p&gt;
&lt;p&gt;You might want to seriously look into using the &lt;a target="_blank" href="http://www.asp.net/AJAX/AjaxControlToolkit/Samples/PasswordStrength/PasswordStrength.aspx"&gt;Password Strength Ajax Extender&lt;/a&gt; available from the Ajax Toolkit.  It's really nice and goes a long way to solving your users' password complexity woes.  It's simply to use and you can implement it in a matter of minutes.&lt;/p&gt;
&lt;p&gt;Tom Hundley&lt;br /&gt;
Elegant Software Solutions&lt;/p&gt;</description>
      <link>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=37</link>
      <author>tom.hundley@elegantsoftwaresolutions.com</author>
      <comments>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=37#Comments</comments>
      <guid isPermaLink="true">http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=37</guid>
      <pubDate>Tue, 02 Sep 2008 16:15:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://elegantsoftwaresolutions.com/DesktopModules/Blog/Trackback.aspx?id=37</trackback:ping>
    </item>
    <item>
      <title>Telerik Grid for ASP.Net Ajax: Selecting Page and Row after Insert</title>
      <description>&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;The Telerik RadGrid automatically goes to the last page of the grid when inserting records, which is fine you don't care about seeing the newly inserted item.  This code will show you how to select the page and row which was just created.  The commented code at the bottom will also show you how to open the record in edit mode in cases where you need the page opened in such a manner.  &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 9pt; font-family: Arial"&gt;Simply subscribe to the PreRender event of the grid, enumerate the datasource directly to get the new records row index so that you can determine the page index and there you go.  Note that the Items collections on all of the grid objects only have the total number of items in that page, which is why you need to enumerate the datasource.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;        if (Session[sessionObjectToFind] != null)&lt;br /&gt;
        {&lt;br /&gt;
            Guid storeRefId = new Guid(Session[sessionObjectToFind].ToString());&lt;br /&gt;
            Session[sessionObjectToFind] = null;&lt;/p&gt;
&lt;p&gt;            int pageIndex = 0;&lt;br /&gt;
            int rowIndex = 0;&lt;/p&gt;
&lt;p&gt;            for (int i = 0; i &lt; ((VList&lt;storeflat&gt;&lt;/storeflat&gt;)rgStores.DataSource).Count; i++)&lt;br /&gt;
            {&lt;br /&gt;
                if (((VList&lt;storeflat&gt;&lt;/storeflat&gt;)rgStores.DataSource)[i].StoreRefId == storeRefId)&lt;br /&gt;
                {&lt;br /&gt;
                    rowIndex = i;&lt;br /&gt;
                    pageIndex = Convert.ToInt32(Decimal.Truncate((rowIndex / rgStores.PageSize)));&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;/p&gt;
&lt;p&gt;            rgStores.CurrentPageIndex = pageIndex;&lt;br /&gt;
            rgStores.Rebind();&lt;/p&gt;
&lt;p&gt;            rgStores.SelectedIndexes.Add(rgStores.MasterTableView.FindItemByKeyValue("StoreRefId", storeRefId).ItemIndex);&lt;br /&gt;
        }&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;font face="Arial"&gt;Oh, one last thing- you need to have some sorting logic applied to your datasource in your grid's NeeddDataSource event handler.  This is an example:&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt; &lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;        if (rgStores.MasterTableView.SortExpressions.Count == 0)&lt;br /&gt;
        {&lt;br /&gt;
            stores.Sort("DivisionName, StoreName");&lt;br /&gt;
        }&lt;br /&gt;
        else&lt;br /&gt;
        {&lt;br /&gt;
            string sortExpression = string.Empty;&lt;br /&gt;
            for (int i = 0; i &lt; rgStores.MasterTableView.SortExpressions.Count; i++)&lt;br /&gt;
            {&lt;br /&gt;
                sortExpression += rgStores.MasterTableView.SortExpressions[i].ToString();&lt;br /&gt;
                if (i + 1 &lt; rgStores.MasterTableView.SortExpressions.Count)&lt;br /&gt;
                {&lt;br /&gt;
                    sortExpression += ",";&lt;br /&gt;
                }&lt;br /&gt;
            }&lt;br /&gt;
            stores.Sort(sortExpression);&lt;br /&gt;
        }&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt"&gt;        rgStores.DataSource = stores;&lt;br /&gt;
    }&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;  &lt;/p&gt;
&lt;p&gt;Tom Hundley,&lt;br /&gt;
Elegant Software Solutions, LLC&lt;/p&gt;</description>
      <link>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=26</link>
      <author>tom.hundley@elegantsoftwaresolutions.com</author>
      <comments>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=26#Comments</comments>
      <guid isPermaLink="true">http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=26</guid>
      <pubDate>Tue, 08 Jul 2008 20:55:00 GMT</pubDate>
      <slash:comments>2</slash:comments>
      <trackback:ping>http://elegantsoftwaresolutions.com/DesktopModules/Blog/Trackback.aspx?id=26</trackback:ping>
    </item>
    <item>
      <title>Enable Remote HTTP Testing of Webservices</title>
      <description>&lt;p&gt;Remote testing of web services via HTTP was diabled by default after .Net 1.0, so now you can only invoke test methods with your browser on the server. &lt;br /&gt;
&lt;br /&gt;
Should you ever find the need to enable it again, add the following to the system.Web section of your web.config:&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; font-family: 'Courier New'; mso-no-proof: yes"&gt;webServices&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;  &lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; font-family: 'Courier New'; mso-no-proof: yes"&gt;protocols&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;    &lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; font-family: 'Courier New'; mso-no-proof: yes"&gt;add&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New'; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; mso-no-proof: yes"&gt;"&lt;span style="color: blue"&gt;HttpPost&lt;/span&gt;"&lt;span style="color: blue"&gt; /&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;    &lt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; font-family: 'Courier New'; mso-no-proof: yes"&gt;add&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt; &lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: 'Courier New'; mso-no-proof: yes"&gt;name&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;=&lt;/span&gt;&lt;span style="font-size: 10pt; font-family: 'Courier New'; mso-no-proof: yes"&gt;"&lt;span style="color: blue"&gt;HttpGet&lt;/span&gt;"&lt;span style="color: blue"&gt; /&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;  &lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; font-family: 'Courier New'; mso-no-proof: yes"&gt;protocols&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; font-family: 'Courier New'; mso-no-proof: yes"&gt;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; line-height: 115%; font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;/&lt;/span&gt;&lt;span style="font-size: 10pt; color: #a31515; line-height: 115%; font-family: 'Courier New'; mso-no-proof: yes"&gt;webServices&lt;/span&gt;&lt;span style="font-size: 10pt; color: blue; line-height: 115%; font-family: 'Courier New'; mso-no-proof: yes"&gt;&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 10pt; color: blue; line-height: 115%; font-family: 'Courier New'; mso-no-proof: yes"&gt;&lt;font face="Arial" color="#000000"&gt;Tom Hundley&lt;br /&gt;
Elegant Software Solutions, LLC&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description>
      <link>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=25</link>
      <author>tom.hundley@elegantsoftwaresolutions.com</author>
      <comments>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=25#Comments</comments>
      <guid isPermaLink="true">http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=25</guid>
      <pubDate>Sun, 15 Jun 2008 05:26:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://elegantsoftwaresolutions.com/DesktopModules/Blog/Trackback.aspx?id=25</trackback:ping>
    </item>
    <item>
      <title>Microsoft ASP.NET 2.0 Providers </title>
      <description>&lt;p&gt;This is a quick reference to the Microsoft documentation explaining the ASP.Net SQL providers.  All copyright belongs to Microsoft.&lt;/p&gt;&lt;a href=http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=7&gt;More...&lt;/a&gt;</description>
      <link>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=7</link>
      <author>tom.hundley@elegantsoftwaresolutions.com</author>
      <comments>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=7#Comments</comments>
      <guid isPermaLink="true">http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=7</guid>
      <pubDate>Sun, 03 Feb 2008 20:48:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://elegantsoftwaresolutions.com/DesktopModules/Blog/Trackback.aspx?id=7</trackback:ping>
    </item>
    <item>
      <title>Using SQL to manage ASP.Net Session State</title>
      <description>&lt;p&gt;This is a quick reference to the Microsoft documentation explaining how to use SQL Server for ASP.Net Session State.  All copyright belongs to Microsoft.&lt;/p&gt;&lt;a href=http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=6&gt;More...&lt;/a&gt;</description>
      <link>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=6</link>
      <author>tom.hundley@elegantsoftwaresolutions.com</author>
      <comments>http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=6#Comments</comments>
      <guid isPermaLink="true">http://www.elegantsoftwaresolutions.com/Default.aspx?tabid=816&amp;EntryID=6</guid>
      <pubDate>Sun, 03 Feb 2008 20:43:00 GMT</pubDate>
      <slash:comments>0</slash:comments>
      <trackback:ping>http://elegantsoftwaresolutions.com/DesktopModules/Blog/Trackback.aspx?id=6</trackback:ping>
    </item>
  </channel>
</rss>