Thursday, July 26, 2012

“DropDownList.SelectedIndex = -1” problem

Please try below syntax: 


DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByValue("Select")) 
or 
DropDownList1.SelectedIndex = DropDownList1.Items.IndexOf(DropDownList1.Items.FindByText("SelectText")) 
or 
 DropDownList1.Items.FindByText("Select").selected =true


you can refer solution at :
http://stackoverflow.com/questions/81214/dropdownlist-selectedindex-1-problem/11666108#11666108

Thursday, July 19, 2012

Recursive query for Parent id

DECLARE @id INT
SET @id = 5 

CREATE TABLE #temp (id INT , ParentId INT)
INSERT INTO #temp VALUES(1,0)
INSERT INTO #temp VALUES(2,1)
INSERT INTO #temp VALUES(3,2);
INSERT INTO #temp VALUES(4, 3);
INSERT INTO #temp VALUES(5,4);

WITH parent AS
(
   SELECT id, parentId  from #temp WHERE id = @id
   UNION ALL 
   SELECT t.id, t.parentId FROM parent
   INNER JOIN #temp t ON t.id =  parent.parentid
)

SELECT id,ParentId FROM parent

Friday, July 13, 2012

What is Income Tax New Tax slab/saving limits/Exemption limit for F.Y. 2011-2012?

For Male (Below the Age 60 Years)
Up to 1,80,000 NIL
From 1,80,001 to 5,00,000 10%
From 5,00,001 to 8,00,000 20%
Above Than 8,00,000 30%

For Female (Below the Age of 60 Years)
Up to 1,90,000 NIL
From 1,90,001 to 5,00,000 10%
From 5,00,001 to 8,00,000 20%
Above Than 8,00,000 30%

For Senior Citizen (Above than 60 years of age)
Up to 2,50,000 NIL
2,50,001 to 5,00,000 10%
5,00,001 to 8,00,000 20%
Above Than 8,00,000 30%

For Senior Citizen (Over 80 years of age)
Up to 5,00,000 NIL

Top 9 Some major announcements:

1) Surcharge for companies cut to 5 per cent, from 7.5 per cent. 
2) Service tax retained at 10 per cent; duty exemptions to be withdrawn on various items. 
3) Net loss from direct tax proposals estimated at Rs 11,500 crore for the year. 
4) Excise and customs duty proposals to result in the net gain of Rs 7,300 crore. 
5) Service tax on air travel increased by Rs 50 for domestic travel and Rs 250 for international travel in economy class. On higher classes, it will be ten per cent flat.
6)Service tax widened to cover hotel accommodation above Rs 1,000 per day, A/C restaurants serving liquor, some category of hospitals, diagnostic tests. 
7) Basic customs duty on agricultural machinery reduced to 4.5 per cent from 5 per cent. 
8) Peak rate of customs duty maintained at 10 per cent in view of the global economic situation. 
9) Nominal one per cent central excise duty on 130 items entering the tax net. Basic food and fuel and precious stones, gold and silver jewellery will be exempted. 

Wednesday, July 11, 2012

How can we remove Row affected message in SQL SERVER? like "8 rows affected."


In this post, I am going to discuss that how you can remove row affected message in SQL SERVER while you fire a query in SQL Server. You can able to do that using NOCOUNT keyword like :

set NOCOUNT on
select * from tblVideo
set NOCOUNT off

OutPut:




Enjoy Magic Tricks!

How can we display the time for multiple queries in SQL SERVER?


In this post, you can able to display the time of multiple queries in SQL SERVER. 

set statistics time on 
select * from tblVideo 
select * from tblNews 
set statistics time off 

 Within Results Tab, you can able to see set of records like : 


 OutPut: Within Messages Tab, you can able to see time for multiple queries like : 


 Enjoy it! :-)

PARASHURAMA JAYANTI 2020

In year 2020, Parashurama Jayanti will Celebrate on Saturday, 25th April 2020. Parashurama Jayanti Muhurat : Parashurama J...