1

Detect when a session has ended ASP.NET

Posted by Tim on June 30, 2010 in .NET Framework, ASP.NET, Visual Basic

A problem that I have had in the past is trying to find out when a session has expired within ASP.NET and how to deal with the expired session.   One solution is to add the following code into the Page_Init event.   You can add this event into a class that inherits the Page class so [...]

Tags: ,

 
0

Could not load file or assembly ‘NameOfAssemblyGoesHere’

Posted by Tim on June 11, 2010 in .NET Framework, ASP.NET

Encounted the following error: Could not load file or assembly ‘NameOfAssemblyGoesHere’ or one of its dependencies. An attempt was made to load a program with an incorrect format. The problem happened when deploying a web application to a 64bit server where all the required DLL’s where marked as running only on a 32bit system.   You [...]

Tags: ,

 
0

Change username in ASP.NET Membership Provider

Posted by Tim on May 31, 2010 in .NET Framework, ASP.NET

Found a great article here about the process of changing the username with the ASP.NET Membership Provider. Here is a summary of the process that I found best useful which is one of the comments: 1. Make sure New UserName is Unique 2. Update the aspnet_Users table directly 3. Execute to following code to change [...]

Tags: ,

 
0

A way around page refreshes/back button problems with a simple concept

Posted by Tim on May 17, 2010 in .NET Framework, ASP.NET, News, Open Source, Uncategorized

The problem: You have a form in which the user fills out and clicks a “submit” button that validates their input, does some processing and output’s some results. The problem being the application needs to cater for page refreshes, back buttons and the case of the page being submitted more than once (latency/slow internet connection). [...]

Tags: , ,

 
0

DateTime.ToString()

Posted by Tim on November 5, 2009 in .NET Framework, ASP.NET

Here is a link that is useful as a reference for DateTime.ToString patterns References: http://www.geekzilla.co.uk/View00FF7904-B510-468C-A2C8-F859AA20581F.htm

Tags: ,

 
0

A CMS that integrates into ASP.NET MVC

Posted by Tim on April 13, 2009 in .NET Framework, ASP.NET, C#, Open Source

Here is a open source CMS called N2 that provides a CMS framework to build web applications on using the ASP.NET MVC Model.   Its a very basic CMS, but it provides all the core functionality including Pages, Articles and a .NET Permissions Model (it also has some add ons and allows developers to contribute their [...]

Tags: ,

 
0

Using the HttpWebRequest class

Posted by Tim on January 14, 2009 in ASP.NET, C#

In this particular scenario I had to initiate a request from another website in code and track its response to be modified and rendered back to the user. I had a series of LinkButton html controls on the web form that consume one event. <asp:LinkButton id=”link1” runat=”server” onClick=”genericEvent”></asp:LinkButton> When the user clicks on a particular [...]

Tags:

 
0

Using ASP.NET MVC on IIS6 or below

Posted by Tim on January 13, 2009 in .NET Framework, ASP.NET, C#

When you are building a web applicatio using the ASP.NET MVC framework on IIS7, it URL routing works smoothly and without any dramas.   But when it comes to IIS6 you have to make a comprimse especially if you are developing web apps within a shared hosting envoirnment.   I found the easist way is to change [...]

Tags: , ,

 
0

W3C Validation and ASP.NET ViewState

Posted by Tim on November 25, 2008 in ASP.NET

The problem I came across a very interesting point about validating XHTML pages using W3C XHTML Strict and ViewState.   By default ASP.NET ViewState adds a number of hidden fields to handle the postback of ASP.NET pages, control state and control event validation.  See example below. <input type=”hidden” name=”__VIEWSTATE” id=”__VIEWSTATE” value=””  /> When validating web pages [...]

Tags: , , ,

 
0

Creating a generic list of anonymous types

Posted by Tim on October 4, 2008 in .NET Framework, ASP.NET, C#

Scenerio I have a simple HTML form on a ASP.NET Web page. This form is to post a number of values including several elements that are compulsory to perform several actions on the server. As we know, when we post values to ASP.NET these are available for Request.Form. All we know is the key and [...]

Tags: , , , ,

Copyright © 2008-2010 Tim's CodeLab Blog All rights reserved.
Desk Mess Mirrored v1.7 theme from BuyNowShop.com.