:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Microsoft Related >> ASP.NET


 Visual Basic interview questions  Visual Basic Interview Questions (615)
 C Sharp interview questions  C Sharp Interview Questions (722)
 ASP.NET interview questions  ASP.NET Interview Questions (1444)
 VB.NET interview questions  VB.NET Interview Questions (151)
 COM+ interview questions  COM+ Interview Questions (41)
 ADO.NET interview questions  ADO.NET Interview Questions (199)
 IIS interview questions  IIS Interview Questions (86)
 MTS interview questions  MTS Interview Questions (5)
 Crystal Reports interview questions  Crystal Reports Interview Questions (62)
 BizTalk interview questions  BizTalk Interview Questions (33)
 Dot Net interview questions  Dot Net Interview Questions (861)
 Exchange Server interview questions  Exchange Server Interview Questions (103)
 SharePoint interview questions  SharePoint Interview Questions (25)
 WCF interview questions  WCF Interview Questions (8)
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions (193)
How to convert a string into an Integer in
 Question Submitted By :: ASP.NET
I also faced this Question!!     Answer Posted By  
# 1
by two ways u can do that

int a = Int.Parse("String");


int a = Convert.Int32("String");
Is This Answer Correct ?    97 Yes 17 No
# 2
we can do this way also
int intA=Convert.ToInt32("string");
Is This Answer Correct ?    45 Yes 21 No
# 3
int A = CInt("String") i think this is the best way 
Is This Answer Correct ?    24 Yes 7 No
# 4
If you don't pass integer value, it gives the
exception "Input string was not in a correct format."
Is This Answer Correct ?    14 Yes 1 No
Sai Krishna
# 5
int a = Convert.ToInt32("2");

int b = Int32.Parse("3");

Response.Write( a.ToString() + " " + b.ToString());
Is This Answer Correct ?    11 Yes 1 No
Sai Krishna
# 6
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
# 7
works only if the input is integer 
Is This Answer Correct ?    15 Yes 11 No
# 8
Is This Answer Correct ?    10 Yes 9 No
# 9
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

int a = Convert.Int32("String");
Is This Answer Correct ?    5 Yes 4 No
# 10
All the above are correct. but if you want the integer value of a string( like 'binu') you have to find its ascii value..
There is no other option
Is This Answer Correct ?    1 Yes 0 No

Other ASP.NET Interview Questions
  Question Asked @ Answers
How many types of page. TCS 5
How do you define authentication in Web.Config? Patni 2
How will u decide when to use caching and when to use viewstate?   5
what to magage the state manament in with respect to in_prock and out_prock Aviva 1
I have a datagrid of 10 rows and I am updating the fifth row using template column edit. How wil u know that the row is updated, so that it can be send to database for updating the respective table?   3
how can we maintain security in soted procedure?   1
What is Difference between Application object and Session Object   5
what is difference between const, static and readonly? TVS 2
What is view state and how this can be done and was this there in asp? Accenture 11
what are the State management and Its Uses   2
what is clr . how we access them? TCS 3
What is the name of the process the browser uses to find the address of a web server? a) DMZ b) DNS c) Active Directory d) Database lookup Syntax-Softtech 1
For more ASP.NET Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::