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


Top 5 Contributors of the Month
Imran Ghani
Post New Web Links

if above this, take away one..

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

hi,

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

Categories: 
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