Posted by Elliott Nash |
Filed under seo, .net seo, seo with .net
Search Engine Optimisation - a brief overview
Over the next few weeks I plan to post a series of articles relating to developing with SEO in mind, and more specifically, tricks and techniques every .Net developer should be aware of when developing a site that requires a strong presence in the search engines. This post is a brief overview of SEO.
Search engine optimization or SEO is a technique used in internet marketing. It involves designing and optimizing a website in a manner that makes it more search engine friendly and more visible online. This is to mean, the website is more easily found by search engines and becomes more relevant to search engine result pages when someone keys in a search word or phrase that corresponds to the content on that site.
More...
17c36318-d532-4188-a081-60391e559a52|1|5.0
Posted by Elliott Nash |
Filed under session, .net session, session timeout
The .Net Session Object
The Session object in ASP.NET provides a mechanism for storing data that is specific for each individual user of a web application. The web app can add information to the Session object and retreive information from the session object, this can be acheived from any page within the application.
MSDN defines a session as the period of time that a unique user interacts with a Web application. Essentially, session state is memory in the form of a dictionary object or hash table - storing key-value pairs which can be manipulated for the duration of a users session.
'setting a session value
Session("CustomerName") = "Bob Jones"
'retreiving session value
Dim cName
cName = Session("CustomerName")
Session Timeout
It is often useful in an ASP.NET site to know for a particular request if the user’s session information is still intact (that a timeout has not occurred). This is the number of minutes before an ASP.NET user session is terminated. It must be an integer, and it is in minutes. The default is to terminate the session after 20 minutes.
Session can be set in the web.config as follows:
<system.web>
<sessionState timeout="20" />
<system.web>
190a163b-1343-4209-89a1-eeb12f87d968|0|.0
Posted by Elliott Nash |
Filed under binary search, binary search algorithm, perform binary search, .net binary search
Binary Search Algorithm
The principle of a binary search can be generalized to any type of problem provided the elements of the search can form a sorted list or sequence and it is possible to make a comparison on the order in the sequence.
Playing the number game: Say we have a number range from 0 to 100, and now you have to pick the number I’m thinking of and depending on your guess ill answer with either “correct”, “higher” or “lower”. What number would you choose? The binary search provides the quickest solution to this problem; the number you should choose is 50.
The binary search algorithm is one of the most efficient methods for locating the position of an element in a sorted list. The way it functions is by going straight to the middle of the list and checking whether the value is greater than, less than or equal to the element it's looking for. If equal to, then the element has been found, if not, then the algorithm eliminates half the list from consideration, and repeats the procedure on the remaining half. Thus, the number of elements needing to be checked is halved each time.More...
853a6de8-458e-41ed-8fff-2a6131faa7ca|0|.0
Posted by Elliott Nash |
Filed under database indexes, database relationships, composite index, sql server indexes, sql server relationships, database diagrams
The Importance of SQL Indexes and Database Relationships
A great way to help manage your database indexes and database relationships in MS SQL Server databases is to keep a database diagram up to date. The larger you database the more important optimisation becomes. Remember its alot easier to get things right the first time round than having to go back and refactor problematic code or procedures. Sometimes you can acheive large performance increases by adding required database indexes, but be careful as adding incorrect indexes can have a negative effect on performance.
When connected through Management Studio, expand the Databases list and then expand the database you wish to work on. Right-click Database Diagrams and select New Database Diagram.
An index is basically a sorted list of key values associated with the physical address of the rows that match these key values.
Add your tables to the blank canvas, you now need to add-in the database relationships of all primary and foreign key columns in your tables. More...
9e7743db-1047-44a0-a35d-c347267567a7|0|.0
Posted by Elliott Nash |
Filed under request.servervariables, server variables, loop servervariables
Request.ServerVariables
I've put this post together to use as a reference of all server variables available. Most of the information contained in server variables is gathered from page headers. Also explained here is how to list all the request.servervariables in the collection.
The request.servervariables collection provides information about the server, the connection with the client, and the current request on the connection.
Looping Through Server Variables
You can loop the entire collection of server variables yourself by implementing the following code in a page on your server.
Source Code Example (asp.Net):
Dim ServerVar, tmpValue As String
For Each ServerVar In Request.ServerVariables
tmpValue = Request.ServerVariables(ServerVar)
Response.Write(ServerVar & " = " & tmpValue & "<br />")
Next
Below is a list of the items in the request.servervariables collection and a description of each item: More...
5443b8e5-17e7-4bda-85fb-a8e45e674a1d|0|.0
Posted by Elliott Nash |
Filed under .net, vb, listitem, itemtemplate, e.item.findcontrol
How to use .Net ListItem in the real world
When starting out with .Net the built-in server controls can appear a bit daunting - especially if coming from a classic ASP or PHP background (where you simply write HTML elements out as a string). In this post i will run through an every day example of how to use a ListItem to display data and customise the output via the ItemTemplate.
A .Net ListItem can be used to bind data from a datasource (SQLDataReader, DataTable, ArrayList, GenericList etc...) to display to the end user. The display can be customised through the use of the <itemTemplate> as follows: More...
07a6cc65-cfa7-445f-aeab-bdfd0dbf3b0c|0|.0
Posted by Elliott Nash |
Filed under
If you ever need to edit the commandtext attribute of the .Net dataset tag, you may well see the error message “The server tag is not well formed”.
The most probable cause for this error is the presence of single quotes in your query. More...
343319a1-7aa7-406a-b780-a3410f087a91|0|.0
Posted by Elliott Nash |
Filed under voip, voice over ip, echo, call quality, avaya ip office
We have recently installed an AVAYA IP500 PBX System and experianced a great deal of trouble with regards to call quality and echo on the lines, i'll attempt to explain the issues here and the processes we used to solve them to help anyone who experiences similar problems in the future.
p.s. i will be adding expanding on this post over time...
c41d1734-7d81-4f0f-a326-8c9c76ecd04c|0|.0
Posted by Elliott Nash |
Filed under validation of viewstate mac failed, .net, vb, c#, http exception, viewstate mac
I was simply attempting to post a form from one page to another when i encountered the following error:
HttpException (0x80004005): Validation of viewstate
MAC failed. If this application is hosted by a Web
Farm or cluster, ensure that configuration
specifies the same validationKey and validation
algorithm. AutoGenerate cannot be used in a cluster.
It seems when developing with .NET 2.0 or later there is a bug in the framework which can become apparent if the following conditions are true: More...
759a11c8-e615-4531-8d48-331b2a576581|1|4.0