TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Alex Leon
NA
3
0
Format Double
Jun 30 2009 2:24 PM
Needed some help with the following code. I am trying to format the result to a decimal ##0.00 this is the first time I am trying to work with C# and need some help. Thank you
I have tried to modify the code and I just can't get this correct.
if (this.DataSource.BalanceSpecified) {
string formattedValue = this.DataSource.Format(TblPaymentRequestTable.Balance);
formattedValue = HttpUtility.HtmlEncode(formattedValue);
if(formattedValue != null){
int maxLength = formattedValue.Length;
if (maxLength > (int)(100.00)){
maxLength = (int)(100.00);
}
if (maxLength == (int)(100.00)) {
formattedValue = NetUtils.EncodeStringForHtmlDisplay(formattedValue.Substring(0,maxLength));
formattedValue = formattedValue + "...";
}
}
this.Balance.Text = formattedValue;
} else {
this.Balance.Text = TblPaymentRequestTable.Balance.Format(TblPaymentRequestTable.Balance.DefaultValue);
}
Reply
Answers (
3
)
clone of cdprintexpress(http://www.informatik.com/cdprintexpress.msi)
reachin the class' properties from a class define in the former