.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

if above this, take away one..

Posted By:      Posted Date: October 27, 2010    Points: 0   Category :ASP.Net


i have labels with values from a database.

id like to say: if Label1 is more than Label 55, then Label1s value should be Label1 - 0.5

but if Label1 is less than Label55, then Label1 should be Label1+0.5

How can i write this? label 55 can be a decimal..

if (Label1.Text > Label55.Text)

Label1.Text = ((double.Parse(Label1.Text) - "0.5")

if (Label1.Text < Label55.Text)

Label1.Text = ((double.Parse(Label1.Text) + "0.5")

View Complete Post

More Related Resource Links

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend