:: 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 (1443)
 VB.NET interview questions  VB.NET Interview Questions (150)
 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 Clustered Index and Non clustered index stored on SQL server? TCS 2
repeater and gridview diff? Why is repeater fast than gridview? TCS 3
public key? Microsoft 1
What are the different authentication modes in the .NET environment? Veritas 2
In what order do the events of an ASPX page execute, As a developer is it important to understand these events?   4
How to store a dataset in a viewstate? Patni 3
What are the two properties that are common in every validation control?   4
What is strong name and which tool is used for this ? Patni 2
what is the difference b/w server controls and html server controls in .net? iGate 2
How do you add a javascript function for a link button in a datagrid ? Microsoft 4
I am having four text boxes in my web application. I am setting Required Field validator to each Text box. And I am having two buttons in my application. If i clicked the first button only first two text box validation will get fire. Dont show error message for remaining two text box. If i clicked second button last two text box validation will get fired. It will not consider the first two validation controls. That is how to enable and disable the validation controls.   4
what is diffgram ?   3
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.   ::