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
saifullah khan
NA
335
301.8k
String was in a correct format
Jul 25 2011 6:34 AM
i have some error in code and i dont understand how to remove it.
double f,g;
string a,b;
con.Open();
cmd = new SqlCommand("select MAX (high) FROM DailyChange WHERE Symbol='" + Currency.SelectedValue.ToString() + "' AND Date='" + Label2.Text + "'", con);
a = cmd.ExecuteScalar().ToString();
f = Convert.ToDouble(a);
Response.Write(f);
con.Close();
con.Open();
cmd = new SqlCommand("select MAX (high) FROM DailyChange WHERE Symbol='" + Currency.SelectedValue.ToString() + "' AND Date='" + Label3.Text + "'", con);
b = cmd.ExecuteScalar().ToString();
g = Convert.ToDouble(b);
Response.Write(g);
con.Close();
It gives me the following error:
Input string was not in a correct format.
Line 81: g = Convert.ToDouble(b);
Reply
Answers (
3
)
Only last record is added in the List
How to set visible of buttons in a templatefield to false