How to convert a string into an Integer in ASP.net?
Answer Posted / suresh
int.Parse parses the input (casts in a sense) to an integer
value however it will throw an exception if it cant do it if
the data provided is not numeric. you should use TryParse in
.NET 2.0 to see if it can parse it.
int a = Int.Parse("int");
Convert.ToInt32() converts the string data to a proper true
int32 value, and throws an exception if it can't convert the
value.
int a = Convert.Int32("String");
Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What is csrf attack in asp.net?
Explain client side state management system.
What is asp.net and how it works?
Define the steps to set up validation control.
How to unit test Web API?
How to set the pane area to transparent of a scrollPane component.?
What is the difference between debug and release?
14. What are your Future Plans for Swatz Oils GROUP U.K?
What is the function of new view engine in asp.net? : asp.net mvc
How do you do Client-side validation in .Net?
What is the displayafter property in updateprogress control?
Diff between web user control and web custom control?
What is the sequence in which ASP.NET events are processed?
What is cookieless session id explain in brief?
what is command line compiler.what are the steps and how it is related to debugging.