The simple trick is to enable the Session State before using it directly. This can be done by using the following attribute
[WebMethod(EnableSession = true)] // C#
<WebMethod(EnableSession:=true)> // VB .Net
Once you specify these lines over your web method you can use the session object naturally.

12:59 AM

Format DataTime in SQL Server

Posted by vijay

Hi..
This is the below sql statement mostly used to fomat data and time in SQL .

SELECT convert(varchar, getdate(), 100) – mon dd yyyy hh:mmAM (or PM)
                                        – Oct  2 2008 11:01AM          
SELECT convert(varchar, getdate(), 101) – mm/dd/yyyy 10/02/2008                  
SELECT convert(varchar, getdate(), 102) – yyyy.mm.dd – 2008.10.02           
SELECT convert(varchar, getdate(), 103) – dd/mm/yyyy
SELECT convert(varchar, getdate(), 104) – dd.mm.yyyy
SELECT convert(varchar, getdate(), 105) – dd-mm-yyyy
SELECT convert(varchar, getdate(), 106) – dd mon yyyy
SELECT convert(varchar, getdate(), 107) – mon dd, yyyy
SELECT convert(varchar, getdate(), 108) – hh:mm:ss
SELECT convert(varchar, getdate(), 109) – mon dd yyyy hh:mm:ss:mmmAM (or PM)
                                        – Oct  2 2008 11:02:44:013AM   
SELECT convert(varchar, getdate(), 110) – mm-dd-yyyy
SELECT convert(varchar, getdate(), 111) – yyyy/mm/dd
SELECT convert(varchar, getdate(), 112) – yyyymmdd
SELECT convert(varchar, getdate(), 113) – dd mon yyyy hh:mm:ss:mmm
                                        – 02 Oct 2008 11:02:07:577     
SELECT convert(varchar, getdate(), 114) – hh:mm:ss:mmm(24h)
SELECT convert(varchar, getdate(), 120) – yyyy-mm-dd hh:mm:ss(24h)
SELECT convert(varchar, getdate(), 121) – yyyy-mm-dd hh:mm:ss.mmm
SELECT convert(varchar, getdate(), 126) – yyyy-mm-ddThh:mm:ss.mmm
                                        – 2008-10-02T10:52:47.513
– SQL create different date styles with t-sql string functions
SELECT replace(convert(varchar, getdate(), 111), ‘/’, ‘ ‘) – yyyy mm dd
SELECT convert(varchar(7), getdate(), 126)                 – yyyy-mm
SELECT right(convert(varchar, getdate(), 106), 8)          – mon yyyy

i hope you like this article...

10:48 AM

Myths about India

Posted by vijay


Farmers are committing suicide one side.They are forcibly acquiring farm lands for constructing MNC's on the other side. You know,we can divide independent India's agricultural picture into 2 phases.

It's before free market and after free market. India is basically an agricultural country.When we became an independent country, almost 90% of our people relied upon agriculture and its allied activities as primary source of income.Situation was so smooth until we opened our market i.e until we became a free market economy.But situation drastically changed afterwards. Institute of applied man power research says, between the years 1991 and 2011,i.e in the 1st 20 years of free market India,more than 2 crore farmers have disappeared from agriculture.

Planning commission report says,in last 6 years,around 80 lakh farmers have disappeared.So these figures clearly shows,we are ignoring agriculture and it's activities and moving towards hi-tech world.If farm suicide continues in this current pace,human species will cease to exist from the earth soon. ''Nammaala evalo hi-tech cities venaa build panna mudiyum.Aanaa naama saappadra saappaada oru vivasaayiyaala mattum dhaan uruvaakka mudiyum''



In the 65 years of independence we achieved progress at a brisk pace, but at the same pace, majority of the population was left far behind. The unfortunate truth about India is that one forth of India’s wealth is hoarded by a mere of 100 families, whereas 75% of the population is forced to survive a 40 us cent a day. The mistrust arising out this gap is increasing day by day.