Total Page Preview: 000000002470
asp.net interview questions and answers for freshers
Question 1: What is ASP.Net?
Answer: ASP.NET is a specification developed by Microsoft to create dynamic Web applications, Web sites, and Web services. It is a part of .NET Framework. You can create ASP.NET applications in most of the .NET compatible languages, such as Visual Basic, C#, and J#.
Question 2: What is the basic difference between ASP and ASP.NET?
Answer : The basic difference between ASP and ASP.NET is that ASP is interpreted; whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).
Question 3: What are the different validators in ASP.NET?
Answer : Asp.net validators is :
-
Required field Validator
-
Range Validator
-
Compare Validator
-
Custom Validator
-
Regular expression Validator
-
Summary Validator
Question 4: How long the items in ViewState exists?
Answer : They exist for the life of the current page.
Question 5: what is boxing and unboxing?
Answer : Boxing: Convert a value type to reference type variable.
Unboxing: Convert a reference type to value type variable.
Question 6: List the events in page life cycle in asp.net.
Answer : List of page life cycle:
-
Page_PreInit
-
Page_Init
-
Page_InitComplete
-
Page_PreLoad
-
Page_Load
-
Page_LoadComplete
-
Page_PreRender
-
Render
Question 7: Can we have a web application running without web.Config file?
Answer : Yes.
Question 8: From which base class all Web Forms are inherited?
Answer : Page class.
Question 9: Can we add code files of different languages in App_Code folder?
Answer : No. The code files must be in same language to be kept in App_code folder.
Question 10: In which event are the controls fully loaded?
Answer : Page load event.
Question 11: Where the viewstate is stored after the page postback?
Answer : ViewState is stored in a hidden field on the page at client side. ViewState is transported to the client and back to the server, and is not stored on the server or any other external source.
Question 12: List all templates of the Repeater control ?
Answer : List of templates of the repeater control :
-
ItemTemplate
-
AlternatingltemTemplate
-
SeparatorTemplate
-
HeaderTemplate
-
FooterTemplate
Question 13: Which validator control you use if you need to make sure the values in two different controls matched?
Answer : Compare Validator control.
Question 14: What is ViewState?
Answer : ViewState is used to retain the state of server-side objects between page post backs.
Question 15: What is Protected Configuration?
Answer : It is a feature used to secure connection string information.
Question 16: How do you register JavaScript for webcontrols ?
Answer : We can register javascript for controls using <CONTROL -name> Attribtues.Add(scriptname,scripttext) method.
Question 17: Which data type does the Range Validator control support?
Answer : The data types supported by the RangeValidator control are Integer, Double, String, Currency, and Date.
Question 18: What is the file extension of web service?
Answer : Web services have file extension .asmx.
Question 19: Difference between web.config and machine.config
Thanks
Brijesh Kumar
Thank You
About Author
Brijesh Kumar
Database Developer
I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL
Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall
and Database Migration On-Premise to Azure Cloud.
LinkedIn : https://www.linkedin.com