How to convert a string into an Integer in ASP.net?

Answer Posted / sanjay

1))int a=int.Parse("string");
2))int a=Convert.ToInt32("string");
3))int a=(int)"string";

but the string provided should be integer

Is This Answer Correct ?    9 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is view state and how it works in asp net?

759


How would ASP and ASP.NET applications run at the same time on the same server?

2177


Describe the difference between inline and code behind - which is best in?

737


What does the hotspot class in .net do?

751


What is a 307 redirect?

664


Is web config mandatory?

729


How will create assesblies at run time?

741


What is the importance of Global.asax in ASP.NET?

765


Just by seeing the signature of the bean how can you specify whether it is a stateful or stateless session bean?

737


Explain Optimization technique description?

794


Explain a program using code nuggets to create a simple application? : asp.net mvc

746


Which asp.net objects encapsulate the state of the client and the browser?

781


What is difference between session and cookies?

763


What is the size of Get method and how much data it can store?

793


To display data in a Repeater control which template you provide?

778