<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Communicate Through Technology &#187; Web Development</title>
	<atom:link href="http://www.marbleblue.co.uk/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.marbleblue.co.uk</link>
	<description>Web Development, Database Development, Sharepoint Development, Creating websites and we applications using the latest and greatest technologies, Hertfordshire, London, England, UK, Developers and Programmers.</description>
	<lastBuildDate>Sun, 28 Aug 2011 21:20:14 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Software Development Models &#8211; Quick And Dirty Guide</title>
		<link>http://www.marbleblue.co.uk/software-development-models/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=software-development-models</link>
		<comments>http://www.marbleblue.co.uk/software-development-models/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 01:04:20 +0000</pubDate>
		<dc:creator>Kushel</dc:creator>
				<category><![CDATA[Latest]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[agile development]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[Barry Boehm]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[buzz words]]></category>
		<category><![CDATA[conventional models]]></category>
		<category><![CDATA[customer domain]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[domain expert]]></category>
		<category><![CDATA[Extreme]]></category>
		<category><![CDATA[extreme programming methodology]]></category>
		<category><![CDATA[holy grail]]></category>
		<category><![CDATA[improving productivity]]></category>
		<category><![CDATA[indepth]]></category>
		<category><![CDATA[indepth article]]></category>
		<category><![CDATA[model]]></category>
		<category><![CDATA[phase]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[software development process]]></category>
		<category><![CDATA[success]]></category>
		<category><![CDATA[Warden]]></category>
		<category><![CDATA[Waterfall]]></category>
		<category><![CDATA[way]]></category>

		<guid isPermaLink="false">http://www.marbleblue.co.uk/?p=455</guid>
		<description><![CDATA[A quick personal guide to some sequential and agile software development methodologies that i've come across.

To read more, please click on the title above.


Related posts:<ol><li><a href='http://www.marbleblue.co.uk/logically-modelling-requirements-analytical-systems/' rel='bookmark' title='Permanent Link: Logically Modelling Requirements for Analytical Systems'>Logically Modelling Requirements for Analytical Systems</a> <small>A brief discussion of relational and dimensional logical modelling techniques, to model requirements for analytical systems. The discussion extends into a comparison of some prominent dimensional modelling techniques such as the Bus Matrix, the Starnet Model, the Sun Model and the Star Schema. Click the title above to read more....</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>This post is more to serve as my notes, rather than an in-depth article. </p>
<p>Anyhow, I have just read &#8216;The Art of Agile Development&#8217; by Shire and Warden, which concentrates on the principles, practices and potential benefits of introducing the Extreme Programming methodology into your development teams. If Extreme Programming is a road you feel you may want to go down, or if you require some help with putting the ideas it brings in practice, I can highly recommend this book. For me, XP is currently not an option with the size of the development team I work in, which has been reduced to me, myself and I, together with an, I guess, Product Manager/Customer/Domain Expert, whilst we both double as testers. However, you never know what the future will bring (but you can hope!), so I wanted to give myself some background knowledge on the current popular methodologies.</p>
<p><!-- more --></p>
<p>So, I am going to start by looking at some of the more conventional models for a Software Development Process or Lifecycle, before moving onto the Agile models. The aim of adopting any such model is to achieve improved &#8216;productivity&#8217; and &#8216;quality&#8217; (big buzz words) by using a repeatable and predictable structured process. By incorporating such a model within your project management strategy is to ensure that your projects are delivered ‘successfully’, i.e. on budget, on time and with all the features in the agreed specification. All sounds fantastic in an ideal world where requirements do not change over the length of the project, and design specifications have no mistakes. Up until the revolution that is Agile, this is what we were taught. I also want to mention here that Agile type modelling has probably been used way before the term Agile was coined and applied to defined models. There are probably a large number of software teams who work to their own ideals or models using Agile type processes to enhance the holy grail of productivity and quality, and I should now add to that, delivering what the customer needs to improve their business. All models from what I have read use pretty much the same phases described below, just in a different way. I&#8217;m going to discuss these phases, how they work and the ideas behind them in another blog. </p>
<p>The Waterfall Model, the daddy. This uses sequential movement from Analysis (requirements), to Design, to Construction, to Integration, to Testing, to Deployment to Maintenance. This is also known as a top down strategy. This is a strict ideal where once each phase is completed, only then can the next be started. Moving onto the next phase may be dependent upon a review, which I guess can allow some flexibility if changes are required, however once a phase has been formally completed, the model discourages revisiting or changes to the previous phase. </p>
<p>The Big Design Upfront (BDUF) model comes from the idea of the Waterfall model, and advocates investing a large amount of time on design (without the need for prototyping or any initial implementation at this stage) as to reduce the chances of bugs being created and found within later phases.</p>
<p>The Spiral model is similar in phases to the Waterfall model, but like the BDUF model in that the design phase is seen as the most important. It comes with the aim of combining both Design and Prototyping, resulting in a top down/bottom up combo strategy. The idea is iterative, however, not in the way Agile defines iterations. After exhaustively defining the requirements through a number of strategies, emphasis is placed on creating a preliminary design in which all possible alternatives are investigated and strategies are used to determine the best way forward. The aim of this phase is also to find and resolve risk in each element of the design. If risks show there is uncertainty within the requirements, prototyping can be used to find a solution and an update to the requirements can be made. A preliminary scaled down version of the system is then build from the resulting design. This model is then evolved via firstly evaluation (strengths, weaknesses and risks), and then following the model in another iteration of refining requirements, then design, construction and so on. This can then be repeated.</p>
<p>So what is iterative development in the way Agile sees it? Well, it is basically splitting a project up into small independent chunks, and then applying to Software Development Lifecycle to each chunk until the project is created. Agile development uses this is its basis, but it places higher value on communication and feedback through Test Driven Development practices (TDD) and release of features at regular intervals, rather than meticulous planning.</p>
<p>Coming back to the traditional goals of increased productivity, increased quality and development success (on time, on budget, and with all features) I should start by saying that XP is no magic bullet. It is described as a &#8220;Way of working differently, not faster, although it has been noted that Agile teams usually have above average productivity&#8221;. </p>
<p>So maybe it can hit these goals? But then that depends on whether you define success as stated, or whether this definition of success is limited as it does not take into consideration whether the project hits its business targets of generating cash or improving process or whatever it may be. </p>
<p>This is where an Agile model differs vastly from its predecessors. The aim of an Agile approach is to not only bring personal (increased productivity) and technical (quality of work) success, but also &#8220;organisational success&#8221;, i.e. to deliver value for decreasing costs by changing and adapting to changing business needs and requirements as and when decisions are made and new data is uncovered. This is done through TDD, regular reviews, continual code improvements and therefore enhanced maintainability.</p>
<p>Let’s look at the most complete Agile model, Extreme Programming or XP. XP gears itself towards technical excellence and code longevity using pairs programming where two people review every piece of code. It focuses on operational success by only releasing new features (a feature contains a number of tasks or stories) when they make business sense. This requires code integration from developers so features are ready for release when required. By only working on a single feature at a time and requiring completion before the next is started, this reduces unexpected delays and allows teams the freedom to change direction when business needs dictate them to. A team will commit to a number of tasks/stories for the length of a single iteration, usually a week or two. In a nutshell, XP is about responding to change and technical excellence. The phases of Analysis (requirements gathering), Design, Construction, Integration and Testing are performed simultaneously each day.</p>
<p>According to the book I just read, XP is about:</p>
<ul>
<li>Satisfing customers first with continuous delivery of functionality</li>
<li>Always welcoming changing requirements</li>
<li>Preference to shorter timescales for delivery, 2 weeks to 2 months</li>
<li>Working with the business in a joint effort</li>
<li>Using working software is the best measure of progress</li>
<li>Attention to technical excellence for best agility and longevity</li>
<li>Reflecting continuously to improve efficiency</li>
</ul>
<p>The Analysis phase will consist of the Product Manager, someone who talks with the business and decides what needs to be done will create the requirements for a feature. Estimates by the coders will then allow more details to be added to the requirements before they can be coded.</p>
<p>The Design phase is integrated with coding and testing. As mentioned previously, TDD is used. The requirements are used to create customer tests, preferably with a customer, or someone who knows how the feature needs to work providing the insight and business logic. The tests are passed on to the coders who in pears create work on tasks/stories of the current feature, constantly refactoring and improving the code base. Once coding is complete, unit, integration and end to end testing are done. The code is then passed over for exploratory and performance/stability testing, with root cause analysis applied to any issues found. Regression testing is applied on integration to ensure nothing else has broken.</p>
<p>Deployment first occurs to a demo system. This is timely at the end of the current iteration. The real deployment is dependent on business needs.</p>
<p>After completion of the current iteration a period called retrospectives occurs. Here, the team talk about what went well, what didn&#8217;t, how the process can be improved, and anything which is hindering progress. Finally, the next iteration is discussed and planned.</p>
<p>This is a quick and dirty summary of the XP model, which is far more complex then what I have written here. For more information, I would suggest reading &#8216;The Art of Agile Development&#8217; by Shore and Warden.</p>
<p>Lastly, I want discuss Scrum, another popular Agile model. Scrum is arguably a scaled down version of XP, for smaller development teams. The aim is to produce a feature, or set of features, which are tested and shippable, within a given time-frame (time-boxed), which rather than being pre-defined, is set by the team.<br />
This iteration is called a Sprint. The features going into the Sprint come from what is known as the Product Backlog, a maintained (by the Scrum Master) set of prioritised (by the Product Manager) high level requirements. Any items not complete are removed from the Sprint. Which items go into the next Sprint is determined at a Sprint planning meeting.</p>
<p>As with XP, the aim of Scrum is to be able to adapt to changing business needs and by working in small Sprints, the focus for development can change and when required.</p>
<p>There are a number of further Agile models such as Feature Driven Development (FDD) built around a core set of industry best practice, Agile Unified Process (AUP) and Dynamic System Development Method (DSDM). I hope to look at these in due course.</p>


<p>Related posts:<ol><li><a href='http://www.marbleblue.co.uk/logically-modelling-requirements-analytical-systems/' rel='bookmark' title='Permanent Link: Logically Modelling Requirements for Analytical Systems'>Logically Modelling Requirements for Analytical Systems</a> <small>A brief discussion of relational and dimensional logical modelling techniques, to model requirements for analytical systems. The discussion extends into a comparison of some prominent dimensional modelling techniques such as the Bus Matrix, the Starnet Model, the Sun Model and the Star Schema. Click the title above to read more....</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.marbleblue.co.uk/software-development-models/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Default .Net Membership Provider &#8211; Override Password Generator via Implementing a Custom Membership Provider</title>
		<link>http://www.marbleblue.co.uk/implement-custom-membership-provider/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=implement-custom-membership-provider</link>
		<comments>http://www.marbleblue.co.uk/implement-custom-membership-provider/#comments</comments>
		<pubDate>Thu, 28 Aug 2008 14:08:30 +0000</pubDate>
		<dc:creator>Kushel</dc:creator>
				<category><![CDATA[Latest]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[.Net Membership Provider]]></category>
		<category><![CDATA[alphanumeric characters]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[Custom Membership Provider]]></category>
		<category><![CDATA[Custom Password Generator]]></category>
		<category><![CDATA[End]]></category>
		<category><![CDATA[membership]]></category>
		<category><![CDATA[Override Membership Provider]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[Password Generator]]></category>
		<category><![CDATA[password length]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[SqlMembershipProvider]]></category>
		<category><![CDATA[String]]></category>
		<category><![CDATA[variable declarations]]></category>
		<category><![CDATA[xml code]]></category>

		<guid isPermaLink="false">http://www.marbleblue.co.uk/blog/?p=8</guid>
		<description><![CDATA[Implement a Custom Membership Provider and use it to override the .Net Password Generator.

Click the title above to read more...


Related posts:<ol><li><a href='http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/' rel='bookmark' title='Permanent Link: Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control'>Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control</a> <small>Instructions on how to create a Web Server Control. These instructions will use the example of creating your own Alphabet Selector Control. These principlals can then be applied to creating any control of your choice. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/sharepoint-wss-and-active-directory/' rel='bookmark' title='Permanent Link: Component to Connect to Active Directory with Sharepoint WSS'>Component to Connect to Active Directory with Sharepoint WSS</a> <small>Download a component for your Sharepoint (WSS) Intranet to connect to the Active Directory(AD) via LDAP. This component will allow users to search for colleagues in the AD. It will also allow users to update their own contact details. This component requires Window Authenticated access to your Intranet. Click on the title above to read more......</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>If you use the default membership provider (SqlMembershipProvider) in your .Net Web Application, the default behavior of the password generator will be giving you randomly generated passwords such as #@[tdf$#_dfg67d$%_[ etc etc which include some very confusing non-alphanumeric characters.</p>
<p>If you want to limit the character pool the password generator selects characters from or change the maximum number of characters selected in your randomly generated passwords, you will need to implement your own Custom Membership Provider to override this behaviour.<br />
<span id="more-8"></span><br />
1 &#8211; Create a new class in your project and name it say &#8216;MyMembershipProvider&#8217;.<br />
2 &#8211; Inherit from the default &#8216;SqlMembershipProvider&#8217;.<br />
3 &#8211; Override the Initialize method to reset the password length.<br />
4 &#8211; Override the GeneratePassword method with your custom method for generating a password.</p>
<p>The VB.Net code listing can be found at the bottom of this blog entry. If you would like this converted to C#, let me know.</p>
<p>For your Web application to make use of your new Custom Membership Provider, you need to make some changes to your web.config file.</p>
<p>In your web.config file, you will see the following -</p>
<pre class="brush: xml;">
&lt;membership defaultProvider=&quot;DefaultMembershipProvider&quot;&gt;
    &lt;providers&gt;
    ...
    &lt;/providers&gt;
&lt;/membership&gt;
</pre>
<p>Update this to</p>
<pre class="brush: xml;">
&lt;membership defaultProvider=&quot;MyMembershipProvider&quot;&gt;
    &lt;providers&gt;
        &lt;add name=&quot;MyMembershipProvider&quot; type=&quot;MembershipProvider&quot; minRequiredPasswordLength=&quot;6&quot; .... /&gt;
    &lt;/providers&gt;
&lt;/membership&gt;
</pre>
<p>Code listing for MyMembershipProvider class:</p>
<pre class="brush: vb;">
Public Class MyMembershipProvider
    Inherits SqlMembershipProvider 

    ' private variable declarations
    Private _random As System.Random
    Private _chars() As String
    Private _passwordLength As Integer 

    ' Constructor
    Public Sub New()
        _random = New Random
        _chars = InitialiseCharArray()
        _passwordLength = 6
    End Sub 

    ' Override Initialize method to reset the password length
    Public Overrides Sub Initialize(ByVal name As String, ByVal config As  system.Collections.Specialized.NameValueCollection)
        Dim _l As String = _passwordLength
        Dim _lc As String = config(”resetPasswordLength”)

        If Not IsNothing(_l) Then
           ' Have to remove the config entry as the provider we are inheriting from
           ' doesn’t understand it and will throw an exception.
            config.Remove(”resetPasswordLength”)
            If Not Integer.TryParse(_lc, _l) Then
               _l = _passwordLength
            End If
        End If
        MyBase.Initialize(name, config)
    End Sub

    ' Procedure to override the password generation functionality and return a random password of 6 alphnumberic characters.
    Public Overrides Function GeneratePassword() As String
        Dim _password As String = String.Empty
        For i As Integer = 1 To _passwordLength
            _password &amp;amp;amp;amp;amp;= GenerateRandomCharacter()
        Next
        Return _password
    End Function

    ' Create a character map of characters we want our passwords to be constructed from.
    Private Function InitialiseCharArray() As String()
        Dim _s(34) As String
        ' Add numbers, 1 to 9.
        For i As Integer = 0 To 8
            _s(i) = i + 1
        Next
        ' Add letters, a to z - lowercase only.
        For j As Integer = 97 To 122
            _s(j - 88) = Char.ConvertFromUtf32(j)
        Next
        Return _s
    End Function  

    ' Procedure to return a random character from our character list.
    Private Function GenerateRandomCharacter() As String
        Return _chars(_random.Next(_chars.GetUpperBound(0)))
    End Function
End Class
</pre>


<p>Related posts:<ol><li><a href='http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/' rel='bookmark' title='Permanent Link: Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control'>Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control</a> <small>Instructions on how to create a Web Server Control. These instructions will use the example of creating your own Alphabet Selector Control. These principlals can then be applied to creating any control of your choice. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/sharepoint-wss-and-active-directory/' rel='bookmark' title='Permanent Link: Component to Connect to Active Directory with Sharepoint WSS'>Component to Connect to Active Directory with Sharepoint WSS</a> <small>Download a component for your Sharepoint (WSS) Intranet to connect to the Active Directory(AD) via LDAP. This component will allow users to search for colleagues in the AD. It will also allow users to update their own contact details. This component requires Window Authenticated access to your Intranet. Click on the title above to read more......</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.marbleblue.co.uk/implement-custom-membership-provider/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alphabet Selector Web Server Control</title>
		<link>http://www.marbleblue.co.uk/alphabet-selector-web-server-control/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=alphabet-selector-web-server-control</link>
		<comments>http://www.marbleblue.co.uk/alphabet-selector-web-server-control/#comments</comments>
		<pubDate>Wed, 27 Aug 2008 14:41:14 +0000</pubDate>
		<dc:creator>Kushel</dc:creator>
				<category><![CDATA[Latest]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Alphabet Control]]></category>
		<category><![CDATA[Alphabet Selector Control]]></category>
		<category><![CDATA[Alphabet Selector Web Server Control]]></category>
		<category><![CDATA[Alphabet Web Server Control]]></category>
		<category><![CDATA[cc1]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[dll]]></category>
		<category><![CDATA[explorer c]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Free Alphabet Control]]></category>
		<category><![CDATA[Free Control]]></category>
		<category><![CDATA[Free Letter Selector Control]]></category>
		<category><![CDATA[global assembly]]></category>
		<category><![CDATA[letter]]></category>
		<category><![CDATA[Letter Selector Control]]></category>
		<category><![CDATA[plumbing code]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[reference]]></category>
		<category><![CDATA[server control]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Web Server Control]]></category>

		<guid isPermaLink="false">http://www.marbleblue.co.uk/blog/?p=7</guid>
		<description><![CDATA[A free control will display the alphabet, A to Z, where each letter is clickable. On clicking a letter, an event is raised detailing the letter which was clicked. This letter can then be captured and used as needed, for example to display a set of results beginning with the specific letter.

Click the title above to read more...


Related posts:<ol><li><a href='http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/' rel='bookmark' title='Permanent Link: Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control'>Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control</a> <small>Instructions on how to create a Web Server Control. These instructions will use the example of creating your own Alphabet Selector Control. These principlals can then be applied to creating any control of your choice. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/failure-adding-assembly-to-the-cache-unknown-error/' rel='bookmark' title='Permanent Link: Failure adding assembly to the cache: Unknown Error &#8211; GACUtil'>Failure adding assembly to the cache: Unknown Error &#8211; GACUtil</a> <small>A solution for: Failure adding assembly to the cache: Unknown Error - when adding an Assembly to the Global Assembley Cache (GAC) Click on the title to read more......</small></li><li><a href='http://www.marbleblue.co.uk/sharepoint-wss-and-active-directory/' rel='bookmark' title='Permanent Link: Component to Connect to Active Directory with Sharepoint WSS'>Component to Connect to Active Directory with Sharepoint WSS</a> <small>Download a component for your Sharepoint (WSS) Intranet to connect to the Active Directory(AD) via LDAP. This component will allow users to search for colleagues in the AD. It will also allow users to update their own contact details. This component requires Window Authenticated access to your Intranet. Click on the title above to read more......</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>This control will display the alphabet, A to Z, where each letter will be clickable. On clicking a letter, an event is raised detailing the letter which was clicked. This letter<br />
can then be captured and used as needed, for example to display a set of results beginning with the specific letter.<br />
<span id="more-7"></span><br />
<center><img src="http://www.marbleblue.co.uk/Downloads/AlphabetSelectorWebControl/preview.gif" alt="Directory Search" /></center></p>
<p>To download this web server control and with projects (VB.Net and C#), please click <a href="http://www.marbleblue.co.uk/downloads/alphabetselectorwebcontrol/Kushel.Com.AlphabetWebControlDemo.zip">HERE</a>.</p>
<p>To use the web server control in your own projects, you will need to reference the dll file. The dll file is available in the &#8216;Bin&#8217; directory of both sample projects, select either one.</p>
<p>To use the control in a single project, add a reference to the dll file (<em>Visual Studio &#8211; Project &#8211; Add Reference</em> &#8211; Browse to dll file). The reference will appear in your project&#8217;s &#8216;Bin&#8217; directory. Then simply register the control in your webpage (<em>&lt;@Register&#8230;.&gt;</em>) and add the control <em>&lt;cc1:Alphabet&#8230;..&gt;.</em></p>
<p>To make the control so it is available to all your projects, add it to the Global Assembly Cache by either:</p>
<p>1) Windows Explorer &#8211; <em>C:\Windows\Assembly</em> &#8211; drop dll file into there.<br />
OR<br />
2) Use the GACUtil tool from Visual Studio Cmd Prompt &#8211; <em>GACUtil.exe /if &lt;path to the dll file&gt;</em>.</p>
<p>Then simply register the control in your webpage (<em>&lt;@Register&#8230;.&gt;</em>) and add the control <em>&lt;cc1:Alphabet&#8230;..&gt;.</em></p>
<p>(You can also add the control to your Visual Studio Toolbox then drag and drop onto your webpage whereby the plumbing code will be automatically created for you).</p>
<p>To learn how to create your own Web Server Control click <a href="http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/">here</a>.</p>


<p>Related posts:<ol><li><a href='http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/' rel='bookmark' title='Permanent Link: Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control'>Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control</a> <small>Instructions on how to create a Web Server Control. These instructions will use the example of creating your own Alphabet Selector Control. These principlals can then be applied to creating any control of your choice. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/failure-adding-assembly-to-the-cache-unknown-error/' rel='bookmark' title='Permanent Link: Failure adding assembly to the cache: Unknown Error &#8211; GACUtil'>Failure adding assembly to the cache: Unknown Error &#8211; GACUtil</a> <small>A solution for: Failure adding assembly to the cache: Unknown Error - when adding an Assembly to the Global Assembley Cache (GAC) Click on the title to read more......</small></li><li><a href='http://www.marbleblue.co.uk/sharepoint-wss-and-active-directory/' rel='bookmark' title='Permanent Link: Component to Connect to Active Directory with Sharepoint WSS'>Component to Connect to Active Directory with Sharepoint WSS</a> <small>Download a component for your Sharepoint (WSS) Intranet to connect to the Active Directory(AD) via LDAP. This component will allow users to search for colleagues in the AD. It will also allow users to update their own contact details. This component requires Window Authenticated access to your Intranet. Click on the title above to read more......</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.marbleblue.co.uk/alphabet-selector-web-server-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating a Custom Web Server Control &#8211; Alphabet Selector Web Server Control</title>
		<link>http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/?utm_source=rss&amp;utm_medium=rss&amp;utm_campaign=how-to-create-a-custom-web-server-control</link>
		<comments>http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/#comments</comments>
		<pubDate>Tue, 26 Aug 2008 16:26:11 +0000</pubDate>
		<dc:creator>Kushel</dc:creator>
				<category><![CDATA[Latest]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Alphabet Control]]></category>
		<category><![CDATA[Alphabet Selector Control]]></category>
		<category><![CDATA[amp]]></category>
		<category><![CDATA[choice web]]></category>
		<category><![CDATA[click]]></category>
		<category><![CDATA[control library]]></category>
		<category><![CDATA[Create Web Server Control]]></category>
		<category><![CDATA[Creating a Custom Web Server Control]]></category>
		<category><![CDATA[Creating Custom Web Server Controls]]></category>
		<category><![CDATA[Creating Web Server Controls]]></category>
		<category><![CDATA[default property]]></category>
		<category><![CDATA[example projects]]></category>
		<category><![CDATA[Free]]></category>
		<category><![CDATA[Free Alphabet Control]]></category>
		<category><![CDATA[Free Letter Selector Control]]></category>
		<category><![CDATA[generic imports]]></category>
		<category><![CDATA[Letter Selector Control]]></category>
		<category><![CDATA[LinkButton]]></category>
		<category><![CDATA[quot]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[Web Server Control]]></category>
		<category><![CDATA[webcontrol]]></category>

		<guid isPermaLink="false">http://www.marbleblue.co.uk/blog/?p=6</guid>
		<description><![CDATA[Instructions on how to create a Web Server Control. These instructions will use the example of creating your own Alphabet Selector Control. These
principlals can then be applied to creating any control of your choice.

Click the title above to read more...


Related posts:<ol><li><a href='http://www.marbleblue.co.uk/alphabet-selector-web-server-control/' rel='bookmark' title='Permanent Link: Alphabet Selector Web Server Control'>Alphabet Selector Web Server Control</a> <small>A free control will display the alphabet, A to Z, where each letter is clickable. On clicking a letter, an event is raised detailing the letter which was clicked. This letter can then be captured and used as needed, for example to display a set of results beginning with the specific letter. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/implement-custom-membership-provider/' rel='bookmark' title='Permanent Link: Default .Net Membership Provider &#8211; Override Password Generator via Implementing a Custom Membership Provider'>Default .Net Membership Provider &#8211; Override Password Generator via Implementing a Custom Membership Provider</a> <small>Implement a Custom Membership Provider and use it to override the .Net Password Generator. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/sharepoint-wss-and-active-directory/' rel='bookmark' title='Permanent Link: Component to Connect to Active Directory with Sharepoint WSS'>Component to Connect to Active Directory with Sharepoint WSS</a> <small>Download a component for your Sharepoint (WSS) Intranet to connect to the Active Directory(AD) via LDAP. This component will allow users to search for colleagues in the AD. It will also allow users to update their own contact details. This component requires Window Authenticated access to your Intranet. Click on the title above to read more......</small></li></ol>]]></description>
			<content:encoded><![CDATA[<p>The instructions below talk you though building your own Alphabet Selector Web Control. There is also a link at the bottom to download the control if you prefer.<br />
<span id="more-6"></span><br />
1) In Visual Studio, create a new ASP.Net Server Control project (File &#8211; New  &#8211; Project &#8211; Language of Choice &#8211; Web &#8211; ASP.Net Server Control). Name your  project &#8216;ServerControl1&#8242;. Please note, this is also know as a Web Control  Library, depending on which version of Visual Studio you are using. If you cant  find it, check each tab, I found mine under Windows!</p>
<p>2) Your new project will consist of a single class file which inherits from  WebControl. It contains a single default property &#8216;text&#8217; which we do not need,  and an override of the RenderContents method where you place your code if you  want to output to the screen. Since we will be creating a LinkButton control for  each letter in the alphabet and adding this to the page controls, we will not  need to override the RenderContents method. Instead we will be overriding the  OnInit method within which we will create our alphabet.</p>
<p>3) Update the class file as follows:</p>
<pre class="brush: vb;">
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Text
Imports System.Web
Imports System.Web.UI
Imports System.Web.UI.WebControls

Public Class ServerControl1
    Inherits WebControl

End Class
</pre>
<pre class="brush: csharp;">
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public class ServerControl1 : WebControl
{

}
</pre>
<p>4) The first thing we are going to declare is a public event. On selecting a  letter from the Alphabet, an ItemSelected event will be raised. Raising this  event allows the page using our control to know what letter has been selected by  handling the event. In your class definition, add the following:</p>
<pre class="brush: vb;">
Public Class ServerControl1
    Inherits WebControl

    Public Event ItemSelected As System.EventHandler

End Class
</pre>
<pre class="brush: csharp;">
public class ServerControl1 : WebControl
{
    public event EventHandler ItemSelected;

}
</pre>
<p>5) After handling the event declared above, for the page to be able to get to  the data about what letter has been selected, we need to make a public property  available which holds this information. Add the following property to your  code:</p>
<pre class="brush: vb;">
Public ReadOnly Property SelectedItem() As String
    Get
        Dim _s As String = CStr(Me.ViewState(&amp;amp;amp;quot;selected&amp;amp;amp;quot;))
        If _s Is Nothing Then
            Return String.Empty
        Else
            Return _s
        End If
    End Get
End Property
</pre>
<pre class="brush: csharp;">
public string SelectedItem
{
    get
    {
        string _s = (string)(this.ViewState[&amp;amp;amp;quot;selected&amp;amp;amp;quot;]);
        if (_s == null)
            return string.Empty;
        else
            return _s;
    }
}
</pre>
<p>6) Add the code to create the alphabet in the overrideable OnInit function.  Look out for how we define the handler method for the LinkButton click events,  i.e.</p>
<pre class="brush: vb;">
...
AddHandler _lbAll.Click, AddressOf LinkButton_Click
...
</pre>
<pre class="brush: csharp;">
...
_lb.Click += new EventHandler(LinkButton_Click);
...
</pre>
<p>in</p>
<pre class="brush: vb;">
...
Protected Overrides Sub OnInit(ByVal e As System.EventArgs)
    ' Add the A to Z hyperlinks as individual LinkButtons.
    For i As Integer = 65 To 90 ' Ascii representations.
        Dim _lb As LinkButton = CreateLinkButton(Chr(i), Chr(i), Chr(i))
        If Not IsNothing(_lb) Then
            AddHandler _lb.Click, AddressOf LinkButton_Click
            Me.Controls.Add(_lb)
            Me.Controls.Add(New LiteralControl(&amp;amp;amp;quot; &amp;amp;amp;quot;))
        End If
    Next
    ' Optional - add an 'All' button.
    Dim _lbAll As LinkButton = CreateLinkButton(&amp;amp;amp;quot;All&amp;amp;amp;quot;, &amp;amp;amp;quot;All&amp;amp;amp;quot;, &amp;amp;amp;quot;All&amp;amp;amp;quot;)
    AddHandler _lbAll.Click, AddressOf LinkButton_Click
    _lbAll.CausesValidation = False
    Me.Controls.Add(_lbAll)
    MyBase.OnInit(e)
End Sub

Private Function CreateLinkButton(ByVal text As String, ByVal cArg As String, ByVal id As String) As LinkButton
    Dim _lb As New LinkButton
    _lb.Text = text
    _lb.CommandArgument = cArg
    _lb.ID = id
    Return _lb
End Function
...
</pre>
<pre class="brush: csharp;">
...
protected override void OnInit(EventArgs e)
{
    for (int i = 65; i &amp;amp;amp;amp;lt;= 90; i++)
    {
        LinkButton _lb = CreateLinkButton(Convert.ToChar(i).ToString(), Convert.ToChar(i).ToString(), Convert.ToChar(i).ToString());
        _lb.Click += new EventHandler(LinkButton_Click);
        this.Controls.Add(_lb);
        this.Controls.Add(new LiteralControl(&amp;amp;amp;quot; &amp;amp;amp;quot;));
    }
    // Optional - add an 'All' button.
    LinkButton _lbAll = CreateLinkButton(&amp;amp;amp;quot;All&amp;amp;amp;quot;, &amp;amp;amp;quot;All&amp;amp;amp;quot;, &amp;amp;amp;quot;All&amp;amp;amp;quot;);
    _lbAll.Click += new EventHandler(LinkButton_Click);
    _lbAll.CausesValidation = false;
    this.Controls.Add(_lbAll);
    base.OnInit(e);
}

private LinkButton CreateLinkButton(string text, string cArg, string id)
{
    LinkButton _lb = new LinkButton();
    _lb.Text = text;
    _lb.CommandArgument = cArg;
    _lb.ID = id;
    return _lb;
}
...
</pre>
<p>7 ) Finally, add the click handler function which will store the selected  letter and raise the ItemSelected event to be handled by the page using the  control.</p>
<pre class="brush: vb;">
...
Private Sub LinkButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
    If Not IsNothing(Me.SelectedItem) AndAlso Trim(Me.SelectedItem.ToString) &amp;amp;amp;amp;lt;&amp;amp;amp;amp;gt; &amp;amp;amp;quot;&amp;amp;amp;quot; Then
        Dim _lb As LinkButton = CType(Me.FindControl(Me.SelectedItem), LinkButton)
        _lb.Enabled = True
    End If
    Me.ViewState(&amp;amp;amp;quot;selected&amp;amp;amp;quot;) = CType(sender, LinkButton).CommandArgument
    ' Disable the selected button (to stop it being clicked multiple times and raising the event more than once at a time.)
    CType(sender, LinkButton).Enabled = False
    ' Throw the ItemSelected event.
    RaiseEvent ItemSelected(Me, New EventArgs())
End Sub
...
</pre>
<pre class="brush: csharp;">
...
private void LinkButton_Click(Object sender, System.EventArgs e)
{
    if (this.SelectedItem != null &amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp; this.SelectedItem.ToString() != &amp;amp;amp;quot;&amp;amp;amp;quot;)
    {
        LinkButton _lb = (LinkButton)this.FindControl(this.SelectedItem);
       _lb.Enabled = true;
    }
    this.ViewState[&amp;amp;amp;quot;selected&amp;amp;amp;quot;] = ((LinkButton)sender).CommandArgument;
    // Disable the selected button (to stop it being clicked multiple times and raising the event more than once at a time.)
    ((LinkButton)sender).Enabled = false;
    // Throw the ItemSelected event.
    ItemSelected(this, new EventArgs());
}
...
</pre>
<p> <img src='http://www.marbleblue.co.uk/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> See <a href="http://www.marbleblue.co.uk/alphabet-selector-web-server-control/">this page</a> for information  on how to add your shiny new control to a web page.</p>
<p>To download an Alphabet Selector Web Control with example projects for  both VB.Net and C#, click <a href="http://www.marbleblue.co.uk/alphabet-selector-web-server-control/">here</a></p>


<p>Related posts:<ol><li><a href='http://www.marbleblue.co.uk/alphabet-selector-web-server-control/' rel='bookmark' title='Permanent Link: Alphabet Selector Web Server Control'>Alphabet Selector Web Server Control</a> <small>A free control will display the alphabet, A to Z, where each letter is clickable. On clicking a letter, an event is raised detailing the letter which was clicked. This letter can then be captured and used as needed, for example to display a set of results beginning with the specific letter. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/implement-custom-membership-provider/' rel='bookmark' title='Permanent Link: Default .Net Membership Provider &#8211; Override Password Generator via Implementing a Custom Membership Provider'>Default .Net Membership Provider &#8211; Override Password Generator via Implementing a Custom Membership Provider</a> <small>Implement a Custom Membership Provider and use it to override the .Net Password Generator. Click the title above to read more......</small></li><li><a href='http://www.marbleblue.co.uk/sharepoint-wss-and-active-directory/' rel='bookmark' title='Permanent Link: Component to Connect to Active Directory with Sharepoint WSS'>Component to Connect to Active Directory with Sharepoint WSS</a> <small>Download a component for your Sharepoint (WSS) Intranet to connect to the Active Directory(AD) via LDAP. This component will allow users to search for colleagues in the AD. It will also allow users to update their own contact details. This component requires Window Authenticated access to your Intranet. Click on the title above to read more......</small></li></ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.marbleblue.co.uk/how-to-create-a-custom-web-server-control/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

