In this table I want to insert values in the weight column that is of float type with decimal
values 00 like 100.00, 150.00, 25.00 .
In this table if I am going to insert 25.5 then it will show decimal value bit if I am storing 135.00 it will store 135 only not showing decimal if 00.
I’m not sure from your question what you are actually looking for. Storage and Display are two separate things.
STORAGE
If you want to store a number with a fixed precision in SQL SERVER use DECIMAL
The above will store 5 digits, 3 before the decimal point, and two after.
Here’s the documentation: http://msdn.microsoft.com/en-gb/library/ms187746.aspx
If you are storing currency values, then there is the MONEY datatype too: http://msdn.microsoft.com/en-us/library/ms179882.aspx
DISPLAY
If you are more interested in the display of values rather than the storage (You’ve already mentioned they are floats in the database) then in your C# application you can use something like this:
Here’s the documentation for custom formatting of numbers into strings: http://msdn.microsoft.com/en-gb/library/0c899ak8.aspx