Skip to main content

Posts

Showing posts from March, 2006

ASP.NET

Blog on ASP.NET New in ASP .NET Better language support Programmable controls Event-driven programming XML-based components User authentication, with accounts and roles Higher scalability Increased performance - Compiled code Easier configuration and deployment Not fully ASP compatible Language Support ASP .NET uses the new ADO .NET. ASP .NET supports full Visual Basic, not VBScript. ASP .NET supports C# (C sharp) and C++. ASP .NET supports JScript as before.

C#

Namespaces Namespaces are C# program elements designed to help you organize your programs. They also provide assistance in avoiding name clashes between two sets of code.

SQL

*********************************************************************************** Deleting duplicate records in a table select DISTINCT * into #temp from table1 --apply where condition delete from table1 insert table1 select * from #temp drop table #temp table names starts with # will truncated and dropped after application end *********************************************************************************** get day from date sql datename("dw",getdate()) *********************************************************************************** select getdate() To convert a given date to normal format select convert(nvarchar(12),getdate(),103) ***********************************************************************************

To invoke a specified application at specified time

This is the windows service which will invoke a application at 5.30 pm Here I am invoking a web page using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Diagnostics; using System.ServiceProcess; using System.Timers; using System.Configuration; using System.Globalization; namespace WinWin { public class WinService1 : System.ServiceProcess.ServiceBase { /// /// Required designer variable. /// /// // private System.Timers.Timer aTimer; private System.ComponentModel.Container components = null; //private System.Timers.Timer aTimer = new System.Timers.Timer(); //private System.ComponentModel.Container components = null; private System.Timers.Timer aTimer; public WinService1() { //System.Timers.Timer aTimer; // This call is required by the Windows.Forms Component Designer. InitializeComponent(); // TODO: Add any initialization after the InitComponent call } // The main entry point for the process //pr