Rather than using appSettings, a section from webconfig is a better use for email settings which gives you typed properties in .Net code.
Monday, June 28, 2010
Accessing email settings from web.config
Wednesday, April 14, 2010
What did Apple sold for 2 years comparison
A good graphical comparison of Apple sales between 2008 and 2009
http://www.newmaconline.com/apples-best-selling-products_2010-04-12/
http://www.newmaconline.com/apples-best-selling-products_2010-04-12/
Instant message from any web browser! Try the new Yahoo! Canada Messenger for the Web BETA
Wednesday, March 31, 2010
outputting all attributes except one in xsl
In order to avoid outputting one attribute among all the attributes of a tag, following xpath can be used
Friday, December 18, 2009
Javascript menu goes behind Flash video
If you are using Javascript which goes on top of a video and it doesn't show properly since it goes behind it. Fortunately there is a very easy fix for this. You have to add two things to the object tag of your video and it should take care of it.
please visit adobe's site here
please visit adobe's site here
Labels:
Web Development
Wednesday, November 18, 2009
Deleting Rows in DataTable - .Net
A colleague asked me about deleting rows from DataTable. He was having an issue when removing the rows of the datatable because he was using method DataTable.Rows.Remove(index).
When you are looping through any collection using for each loop, you cannot modify the collection. In order to Delete the rows, the best way is to use the Delete method of the particular row(s) and once you are done with the loop, method accept changes of DataTable will remove the rows from DataTable. Code example is
' Loop though the table
When you are looping through any collection using for each loop, you cannot modify the collection. In order to Delete the rows, the best way is to use the Delete method of the particular row(s) and once you are done with the loop, method accept changes of DataTable will remove the rows from DataTable. Code example is
' Loop though the table
For Each dr As DataRow In ds.Tables(0).Rows
If (dr("Name") = "ABC" Then
dr.Delete()
End If
Next
ds.Tables(0).AcceptChanges() ' this remains outside of the loop
Labels:
DotNet
Wednesday, October 21, 2009
How to avoid SQL cursors
Good article on sqlbook.com about how to avoid cursors. In short, there are two ways which the article suggests
1. Using temporary table with auto generated ID column and loop it through a while loop
2. Use SQL functions when possible to do calculation on a column
Read it here
I saw different articles on sites about the performance comparison between cursors and using while loop. Some places it made sense to use a cursor but the drawback is that it locks the table where while loops using temporary tables won't.
Due to its syntax and de-allocation procedure, I have never really tried using cursors which, not using them seems like a good practice according to some SQL experts. Read today on a site that one interviewer would ask people the syntax of using cursors and if they knew then he would consider it as negative since he wouldn't want people on his team to use them and knowing the syntax means that you use them :)
1. Using temporary table with auto generated ID column and loop it through a while loop
2. Use SQL functions when possible to do calculation on a column
Read it here
I saw different articles on sites about the performance comparison between cursors and using while loop. Some places it made sense to use a cursor but the drawback is that it locks the table where while loops using temporary tables won't.
Due to its syntax and de-allocation procedure, I have never really tried using cursors which, not using them seems like a good practice according to some SQL experts. Read today on a site that one interviewer would ask people the syntax of using cursors and if they knew then he would consider it as negative since he wouldn't want people on his team to use them and knowing the syntax means that you use them :)
Labels:
SQL
Monday, October 19, 2009
Querying SharePoint List Items using jQuery
Very good article by Jan Tielen about using jQuery in Sharepoint. He uses a web content editor webpart in conjunction with jQuery to load Tasks from Task list. This example queries list webservices from client side and loads task in a unordered list. Easy to use code, sort of plug-in play!
Labels:
jQuery,
Sharepoint
Subscribe to:
Posts (Atom)