.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Re: Preparing a leave module using calender

Posted By:      Posted Date: September 26, 2010    Points: 0   Category :ASP.Net


I have been working on a leave module and it created this problem. I am trying to identify the end date from a given start date after deducting the public holidays including Fridays & Saturdays. It works like this,

Suppose, the starting date is '22-Jun-2010' and the No of days employee wishes to take for leave is 25 days. I wanted to calculate the end date excluding the public holidays (Fridays and Saturdays).

For Example

Leave Requested - Start Date = '22/06/2010'

No of days requested = 25 Days

Public Holiday (National Day) = '26/07/2010'

Public Holiday (On the occasion) = '27/07/2010'


Leave Start Date: '22/06/2010'

Leave End Date: 28/06/2010'

(End Date must be calculated without including the Fridays and Saturdays or any given Public Holiday[National Day &On the occasion]  - )

Could some please provide me with a T-sql solution into achieving this.

Thank you very much

View Complete Post

More Related Resource Links

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

Test Run: .NET Module Testing with IronPython


This month we demonstrate how easy it is to use IronPython to test .NET-based libraries.

James McCaffrey

MSDN Magazine June 2009

Calender Extender


Dear All,


I have a calenderextender in a form with the following properties. 

<ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID = "txtDeadLine" Format="dd/MM/yyyy" PopupButtonID="btnDate">

So the date selected by the CalenderExtender, the value gets displayed in the txtDeadLine.Text. The problem is when i save the data, the date displayed in the txtDeadLine.text becomes empty and the date is not saved.

How do i save the date using CalenderExtender. I can save the date using the normal Calender.


Help wud be appreciated




Configure a module through IIS Manager?


I've developed a custom module with a custom configuration section.  Is there a way to create a plug-in or module so IIS Manager can manage the module?  I'm looking for the ability to enable or disable it by site as well as setup various configuration properties.

IE hanging when trying to leave a page


All I want to do is to present my user with a simple confirmation that asks if they want to leave the page or not if they have data on the screen that is not yet saved. I've read many posts on the net and I know the following is the preferred solution, but seems like I can't trap the error in the try..catch blcok properly for IE to continue to execute. I try the same exact code in Google Chrome, & Firefox and it works fine. Meaning, when I click on the Cancel button, the page is not unloaded and the user still has the chance to save their data. This obvioulsy doesn't work with IE. It just hangs.

I would appreciate somebody to give me the correct exact syntax on how to accomplish this. Notice the boldfaced code. Below, is my js:


// Used when leaving the page
        window.onbeforeunload = unloadPage;
        function unloadPage() {
            var startPosition = document.getElementById("<%= startPosition.ClientID%>");
            var hdnRecordSaved = document.getElementById("<%= hdnRecordSaved.ClientID %>");


Module 1: Getting Started Building Web Parts in SharePoint 2010

SharePoint 2010 and Visual Studio 2010 enable you to create Web Parts quickly and easily. You can use project templates and project item templates to help you get started building standard ASP.NET Web Parts. You can also build a new type of Web Part called a Visual Web Part.

Module 3: Building Blocks for Web Part Development in SharePoint 2010

The SharePoint platform includes many built-in Web Parts that you can include in your solution, and provides many more components that you can use in Web Parts that you develop.

Module 5: Accessing SharePoint 2010 Data with Client-Side APIs

SharePoint 2010 provides a new client object model that enables you to create SharePoint solutions that run remotely from the SharePoint server farm.

Module 6: Accessing External Data with Business Connectivity Services in SharePoint 2010

SharePoint 2010 provides a new set of technologies known as Business Connectivity Services for retrieving, editing, updating, and deleting data from external systems.

Module 7: Developing Business Processes with SharePoint 2010 Workflows

SharePoint 2010 provides a powerful workflow framework that enables you to implement custom business processes that are driven by SharePoint data.

Module 8: Creating Silverlight User Interfaces for SharePoint 2010 Solutions

SharePoint 2010 integrates closely with Microsoft Silverlight to enable you to build compelling user interfaces that interact with SharePoint data.

Preparing for SharePoint 2010 Upgrade Today

The SharePoint product team has provided guidance on a number of items that can help organizations prepare, and Service Pack 2 includes a key tool that can provide additional insight and configuration information. This paper, by Quest SharePoint senior architect and evangelist Joel Oleson, walks you through using this key tool and offers major items to consider as you prepare for a SharePoint 2010 upgrade.

http module calling order


Our site uses urlRewriter http module that does the url rewriting for us.

I want to create another http module that will handle our customize URL redirects. Now I want this new customize http module to be call before the UrlRewriter module (to avoid page not found messages the UrlRewriter generates). Is there a way we can contol the calling order ?

http module


I am trying to write a http module that redirect the url:




basically i got a lookup table that contain the Url Alias "breaking_news.aspx"  and its associate ID. Any idea how can i accomplished it?

IIS Crash with Faulting application w3wp.exe, faulting module mscorwks.dll, version 2.0.50727.42

The scenario is that, a .Net Webservice is making calls to C++ DLL (made from VC6 studio) This app works perfectly well for sometimes or over a period or for a high volume of hits and suddenly you see IIS crash along with service crash with the following error "Faulting application w3wp.exe, faulting module mscorwks.dll, version 2.0.50727.42" There is no pattern for this problem. The work around is to restart the IIS.    Can anybody tell me what could be the issue here?

Errors in the back-end database access module. OLE DB reported an overflow of the data type for colu

Getting an error when processing a dimension, Errors in the back-end database access module. OLE DB reported an overflow of the data type for column 0. Errors in the OLAP storage engine: An error occurred while the 'xxxxxx' attribute of the 'Dim XXXXXX' dimension from the 'XXXXXXX' database was being processed. Content of this dimension is very similar to one that is processing no problem. The content of the dimension is one field only of type date.  The original content was imported through SSIS from a DB2 database on an iseries machine.  Thought a first the issue was because of the data contains some null values but the dimension the process OK also has some null  values.  The dimension that processes ok is also a single field of type date. Any help greatly appreciated, Roscoe

Dynamic Ajax Calender Extender

hi i dynamically create Calender Extender and set TargetControl ID and PopupControl Id as dynamically created TextBox Its works fine in windows XP but i tried in Windows 7 return lots of javascript errors value can't be null then something.....   if i didn't add that dynamically created Calendar Extender than no pbm if add then got this errors wats the wrong in windows 7 OS   i m using Vs2008 SP1, Latest Ajax Control Toolkit 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend