This is an incorrect question.
I hope you don't store strings like "0002506" in your database, but you store data in numeric types. (If by some reason you store strings, it's wrong in first place, nothing to discuss. :-)) These types are binary, so 0002506 and 2506 are equal objects.
So, there is nothing to "remove". If you simply display/output this value using
int.ToString()
, it will return "2506", not "0002506".
The leading zeros and other artifacts can only appear if you explicitly specify a string format to do so. Please see:
http://msdn.microsoft.com/en-us/library/8wch342y.aspx[
^],
http://msdn.microsoft.com/en-us/library/dwhawy9k.aspx[
^],
http://msdn.microsoft.com/en-us/library/0c899ak8.aspx[
^].
Bad news for you: you do not know some very basic ideas of programming. Not to worry: you can learn them pretty fast. Just don't waste your time on software development fields you poorly understand but spend more time on learning, until it's too late. :-)
—SA