this blog contains information for .net and sql stuffs. You can find various tips and tricks to overcome problem you may be facing in ...

Tuesday, March 29, 2011

Allowing special character in xml with .net in built class

Recently I was finding solution to allowing special character in xml, it can be done by replacing with replaced code. You can check here

But if you are using .net then we have one inbuilt class that replaces all of the special character with replaced code and you don’t need to worry for every special character replacement.

Code sample:

XMLstring = System.Security.SecurityElement.Escape(XMLstring)

Friday, March 25, 2011

Access to the path FileListAbsolute.txt is Denied (Error for TFS Project)

Recently during our development we come to know very strange problem and stuck to find solution for it. We use TFS for source control system for our various projects that adds capability to work parallel. After getting this error we thought it could be problem of user right’s but all people where getting same error during the build.

After going through project checked in files in server we come to know that during check in some one has checked in obj folder and that was causing this issue around the development area. After deleting this from source control and commit these changes, error of access denied was gone.
We also found same solution in after searching on internet.

Monday, March 21, 2011

Allow special character in XML

XML is very useful in any of the programming language. You have many controls of your data representation. One of the features of platform independent makes vital use of it.

In actual data we have different characters which are not supported in XML if we directly write in it. Here are some lists which can be used to replace actual character in XML.

Less than < can be replaced with &lt

Greater than > can be replaced with &gt

Ampersand & can be replaced with &amp

Quotation "can be replaced with &quot

Apostrophe ' can be replaced with &apos

At the end of replaced character we should keep one ;

Hope this list is useful when we want to use special character in XML.

Wednesday, March 2, 2011

Get next identity value in my table For SQL Server

It may require some time to know what will be our identity value before we actually insert record in our table. Usually we tend to find our max id value by selecting max id from records. But it may be possible you deleted records and now you want to know next identity value. SQL server has given a very nice function for it.


In above line, mytable is table name, in which we want to find next identity value. Very impressive function!!