asp.net-2.0

Jquery blockUI + Validate plugin - Validation not firing

Context: Using Asp.net 2.0 webforms, Jquery 1.3.2 and BlockUI and Validation plugins. I have a Gridview which is databound with some html buttons and then these buttons are wired up in jquery so that when clicked, blockUI displays a div with various inputs. When the modal is submitted, I am using the Validate plug-in to validate the inp...

ASP.NET - Session Time Out

In the web.config file for my application, in the <sessionState> section I have set timeout="60" (in minutes), but session state variables in my application seem to be expiring in about 1 minutes. Any idea what could cause this? ...

Static Cache Error

I have a static Cache that at a set time updates a generic list of Objects from a database. It is just a simple static List: private static List _myObject; public List<myObject> FillMyObject() { if(_myObject == null || myTimer) _myObject = getfromDataBase(); } I have 2 methods to update my object called UpdateMyObject an...

Iterate through existing Session objects

I want to be able to kill existing sessions for the same username when someone logs in to prevent multiple people from using the same login. Is there a way to iterate through existing sessions and kill them? ...

how to make the connectin string visible throughout the solution (across layers)

Hi, I have developed an ASp.net application using three tire architecture and i am reading the connetions string from web.conf file in the UI layer, My problem is i have to pass the connection string as a parameter in all the functions that are in the Bo layer. Is there any work around for making the connection string visible througho...

Can an application "die" without passing Application_End or Application_Error?

Hi, The current application that I'm working on seems to recycle the application pool very often, but when it ends, id doesnt pass Application End or Application Start. This is how my Global.asax looks like. protected void Application_Start(object sender, EventArgs e) { _log.Info("Application_Start"); } protected void Appli...

How to call a CLR Stored Procedure from codebehind of an aspx page?

Hi all How to call a CLR Stored Procedure from codebehind of an aspx page? I am using SqlCommand with commandtext as CLR Stored Procedure name and SqlHelper.ExecuteDataSet() as below. string connectionString = ConfigurationManager.AppSettings["ConnectDB"]; SqlConnection sn = new SqlConnection(connectionString); SqlParameter[] sqlPar...

How do I set minumum password requirements in Umbraco for the membership provider?

I am trying to set minimum password requirements for my membership provider in Umbraco. Currently my web.config membership section looks like this: <membership defaultProvider="UmbracoMembershipProvider" userIsOnlineTimeWindow="15"> <providers> <clear /> <add name="UmbracoMembershipProvider" type="umbraco.provid...

Areas feature in rails

Asp.net mvc 2.0 is introducing Areas feature. I am wondering what is the equivalent of asp.net mvc areas in ruby on rails framework? How rails handles the modules/sub sites functionality? ...

What is best approach on designing this abstract class? (Part 2)

Hi there I have abstract class called Tenant and Customer. The tenant in this case is like owner of the application for multi tenant application model. The relationship between these 2 class are Many to One relationship. public abstract class Tenant { protected Int32 id; protected String name; public Int32 ID { get; set;...

What version of StructureMap can I use in webform app (Net 2.0)

Hi Guys, I am bit confuse. I would like to use StructureMap in my webform app, but it is still Net 2.0. I am not really sure which version I should use. Anyone using StructureMap for Net 2.0 project? Which version? Thanks for any response. X. ...

What is the best tool for Test driven Development using asp.net 2.0?

We are using Asp.Net 2.0 and planning to move to TDD so that middle tier can be developed and tested while others in the team take care of UI and DataBase area. Can anyone kindly let me know the pre-requisites for TDD and which one is the best tool for .net? Thanks... [UPDATE] Thanks everyone for your answers and help. I was readin...

A minimal MVC setup for ASP.NET 2.0

I have to migrate a web application I made with ASP.NET MVC to a regular Visual Studio 2005 ASP.NET Web Forms based website. I've looked at things like MonoRail, but it's too different for my co-workers (who are already uncomfortable with MVC) to use. I've read that the first version of ASP.NET MVC was made in an airplane flight, that'...

C# and JQuery, strange behaviour on postback

Hi, I have an asp.net web site in which I'm trying to insert some ajax call to gain some loading time on page opening. SCENARIO: On page A.aspx I use JQuery $(document).ready() event to trigger an ajax call (via the ajax() method). The ajax call targets B.aspx page (in the same site) which renders a portion of html that I eventually inj...

Problems with Viewstate corruption.

I'm getting errors in a few of my pages: Error Message: Invalid character in a Base-64 string. Error Source: mscorlib Error Target Site: Byte[] FromBase64String(System.String) Error Message: Unable to validate data. Error Source: System.Web Error Target Site: Byte[] GetDecodedData(Byte[], Byte[], Int32, Int32, Int32 ByRef) Error Messa...

"DateTime.Now" - why does it return GMT?

I am running on a Win2003 server, TimeZone set to (GMT -06:00) Central Time. I am programming with VS.NET 2005, f/x 2.x. When I execute the following code I do not get the expected results - but only when it is on the PROD server. Any other machine appears to work correctly. _response.Timestamp = DateTime.Now; Is there a setting hi...

Is it possible to post only the content page and keep master page as is?

I have one master page which applies to all pages in this website. On some of the button click or user events, I want that only content pages are posted back and all the controls of master page should not refresh. Can this be achieved? ...

How to Track F5/Refresh in ASP.Net

I am using VS 2005, C# 2, ASP.Net 2.0 I am unable to find out how to track that user pressed F5/Ctrl+F5/ Open a new Window(Ctrl + N) in ASP.Net. I know that there is a Page.IsPostBack property, which tells that a page is loaded in response to an action taken by user. I am just curious to know, that why isn't there a property as IsRefre...

Using a line of code from codebehind in actual HTML page

I have a database connection which takes an input from the querystring to access the appropriate data. However i have now upgraded things by encoding this data. As a result i now need to run the QueryString value through a function to unencode it. At present i have this code for the DataSource: <asp:SqlDataSource ID="SqlDataSource1" ru...

GridView that toggles percentages of counts

I am using a SqlDataSource that returns a table of raw counts. One of these columns is the "total". I would like to give the user the ability to show these counts as a percentage of total using some sort of toggle switch. My initial idea was to have two CSS classes and somehow put <span class="raw"> and <span class="perc"> around each v...