Coronavirus information - India, coronavirus wiki, coronavirus news, coronavirus stats, coronavirus death toll coronavirus india, Festivals, coronavirus numbers, coronavirus cases, PARASHURAMA JAYANTI 2020
Monday, December 10, 2012
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
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.
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 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! :-)
Tuesday, June 26, 2012
Displaying "No Image" Picture when no Image is available in database
Here, You can
see that how you can display the “NoImage.jpg” picture when you don’t have any image available in database.
I am going to
provide the code snippet in which you can easily handle when the imageURL is null.
Product.aspx :
<asp:DataList ID="dlProductList" runat="server"
onitemdatabound="dlProductList_ItemDataBound">
<ItemTemplate>
<asp:Image ID="imgProduct" runat="server"
ImageUrl='<%# Bind("ProductImage") %>' />
</ItemTemplate>
</asp:DataList>
Product.aspx .cs:
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindData(); } } Protected void dlProductList_ItemDataBound(object sender, DataListItemEventArgs e) { Image imgProduct = (Image)e.Item.FindControl("imgProduct"); //find the Image if (String.IsNullOrEmpty(img.ImageUrl)) { img.ImageUrl = "~/images/ImageNotAvailable.jpg"; } } Protected void BindData () { // Replace your Credential SqlConnection conn = new SqlConnection("server=VIMAL;database=DB;uid=sa;pwd=sa123"); SqlDataAdapter da = new SqlDataAdapter("select * from test", conn); DataTable dt = new DataTable(); da.Fill(dt); dlProductList.DataSource = dt; dlProductList.DataBind(); }
I hope that
it solve your problem! You can comment if you facing any issue in above. Happy
coding!
Friday, June 22, 2012
Exception : IErrorInfo.GetDescription failed with E_FAIL(0x80004005)
Issue :
Once I was
try to fetch record from access database in which I have facing minor error
message like :
“IErrorInfo.GetDescription failed
with E_FAIL(0x80004005)”
Code Snippet :
Private Sub GetItems(ByVal strSearch As String) Try Dim objDAL As New DataAccessLayer str = "SELECT code,ProductDesc from ProductMaster where isDeleted = 0" str = str & " ORDER by ProductDesc" dtTemp = New DataTable() dtTemp = objDAL.GetDataTable(str, DataAccessLayer.QueryType.SelectQuery) If dtTemp.Rows.Count > 0 Then dlProductList.DataSource = dtTemp dlProductList.DataBind() Else lblMag.Visible = True lblMag.Text = "No Records Available yet." End If Catch ex As Exception Finally End Try End Sub
Solution :
Some
database field may be reserved word in several DBMS. You just replace below
line in upper code :
str = "SELECT [code],[ProductDesc ] from ProductMaster
where isDeleted = 0"
you can just
try with bracket like [] around the database field.
I hope that
it will help you and solve your problem!
Wednesday, June 6, 2012
Connection string for Oracle, MySQL, SQLite, Excel, SQL Server and Others
In this
post, i am going to discuss the little bit small things in which you can easily
find out connection string with all properties for below Providers:
For Other database
connectionstring, you can refer the site : http://www.connectionstrings.com
It would be
useful guys! :)
Subscribe to:
Posts (Atom)
PARASHURAMA JAYANTI 2020
In year 2020, Parashurama Jayanti will Celebrate on Saturday, 25th April 2020. Parashurama Jayanti Muhurat : Parashurama J...
-
In year 2020, Parashurama Jayanti will Celebrate on Saturday, 25th April 2020. Parashurama Jayanti Muhurat : Parashurama J...
-
On 5th August 2016, RBI Governor Raghuram Rajan has launched a new portal called ‘Sachet’ which will guide potential small investors and ma...
-
Please try below syntax: DropDownList1.SelectedIndex = DropDownList1.Ite...