ASP.Net MCQs

ASP.Net was developed by Microsoft, it is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. By using ASP.Net we can build dynamic websites, applications, and services.

ASP.Net MCQs: This section contains multiple-choice questions and answers on ASP.Net. It will help the students to test their skills and prepare well for their exams.

ASP.Net Multiple-Choice Questions

List of ASP.Net MCQs

1. What is the full form ASP?

  1. Access Server Pages
  2. Active Service Pages
  3. Active Server Pages
  4. Access Service Pages

Answer: C) Active Server Pages

Explanation:

ASP stands for Active Server Pages.

Discuss this Question


2. ASP.NET is a ____.

  1. Client-Side technology
  2. Server-side technology
  3. Both
  4. None

Answer: B) Server-side technology

Explanation:

ASP.NET is a server-side technology used for web development.

Discuss this Question


3. Which of the following programming language can be used with ASP.NET?

  1. C#.NET
  2. VB.NET
  3. Both
  4. None

Answer: C) Both

Explanation:

ASP.NET can be used with both C#.NET and ASP.NET for web development.

Discuss this Question


4. What is the extension of the ASP.NET page?

  1. .asp
  2. .aspx
  3. .asx
  4. .apx

Answer: B) .aspx

Explanation:

The extension of ASP.NET page is .aspx.

Discuss this Question


5. Is ASP.NET Web form part of ASP.NET core?

  1. Yes
  2. No

Answer: B) No

Explanation:

The ASP.NET web form is not part of the ASP.NET core.

Discuss this Question


6. Which of the following technologies are also used with ASP.NET?

  1. CSS
  2. JavaScript
  3. AJAX
  4. All

Answer: D) All

Explanation:

We can use CSS, JavaScript, and AJAX with ASP.NET for web application development.

Discuss this Question


7. In which form does Postback occur?

  1. Win Forms
  2. HTML Forms
  3. Web Forms
  4. All

Answer: C) Web Forms

Explanation:

The Postback occurs in Web Forms.

Discuss this Question


8. What is the correct use of the web.config file?

  1. To store global information and variable definitions
  2. To configure the domain server
  3. To configure to domain client
  4. Store information about web browser

Answer: A) To store global information and variable definitions

Explanation:

The web.config file is used to store global information and variable definition.

Discuss this Question


9. Is ASP.NET web form supports an event-driven application model?

  1. True
  2. False

Answer: A) True

Explanation:

The ASP.NET web supports an event-driven application model.

Discuss this Question


10. MVC stands for ____.

  1. Model Vocal Controller
  2. Model View Count
  3. Model View Controller
  4. Mode View Controller

Answer: C) Model View Controller

Explanation:

The MVC stands for Model View Controller.

Discuss this Question


11. What namespace is used for ASP.NET Web Form by default?

  1. System.Web.Form
  2. System.Web.UI.Page
  3. System.Web.GUI.Page
  4. System.Web.UI.Form

Answer: D) System.Web.UI.Form

Explanation:

The System.Web.UI.Form namespace is used for ASP.NET web form by default.

Discuss this Question


12. Which of the following attribute must be set on a validator control for the validation?

  1. ControlToValidate
  2. ValidateControl
  3. ValidateToBind
  4. ValidateBind

Answer: A) ControlToValidate

Explanation:

The ControlToValidate attribute must be set on a validator control for the validation.

Discuss this Question


13. Can we style tree view, and menus with CSS?

  1. True
  2. False

Answer: A) True

Explanation:

We can style tree-view, menus with CSS.

Discuss this Question


14. The CSS stands for ____.

  1. Client Style Sheet
  2. Cascading Style Sheet
  3. Common Style Sheet
  4. Cascading Simple Sheet

Answer: B) Cascading Style Sheet

Explanation:

The CSS stands for "Cascading Style Sheet".

Discuss this Question


15. Which term is used for pages that depend on the Master page?

  1. Content Pages
  2. Master Pages
  3. Web Pages
  4. None of the above

Answer: A) Content Pages

Explanation:

The term is used for pages that depend on the Master page are Content Pages.

Discuss this Question


16. Every Server control of ASP.NET must have an id?

  1. True
  2. False

Answer: A) True

Explanation:

Every Server control must have an id.

Discuss this Question


17. Which file contains the Application_Start event?

  1. Global.asax
  2. Web.config
  3. Local.asax
  4. None

Answer: A) Global.asax

Explanation:

The "Global.asax" file contains the Application_Start event.

Discuss this Question


18. Which of the following is not an ASP.NET event?

  1. Init
  2. Import
  3. Load
  4. All

Answer: B) Import

Explanation:

The Import is not an ASP.NET event.

Discuss this Question


19. What is the return type of IsPostBack property?

  1. Integer
  2. Boolean
  3. Float
  4. All

Answer: B) Boolean

Explanation:

The return type of the IsPostBack property is Boolean.

Discuss this Question


20. Can we use ASPX pages in MVC?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can use ASP pages in the MVC application.

Discuss this Question


21. Which of the following folder is used to store DLL files in the ASP.NET application?

  1. App_Code
  2. App_Data
  3. Bin
  4. App_Local

Answer: C) Bin

Explanation:

The Bin folder is used to store DLL files in the ASP.NET application.

Discuss this Question


22. The ASP.NET developed by?

  1. Google
  2. Oracle
  3. Sun Microsystems
  4. Microsoft

Answer: D) Microsoft

Explanation:

The ASP.NET was developed by Microsoft.

Discuss this Question


23. Which of the following method is used to register client script using code dynamically?

  1. Page.ClientScript.RegisterClientScriptBlock
  2. RegisterScript
  3. Page.ClientScript
  4. None

Answer: A) Page.ClientScript.RegisterClientScriptBlock

Explanation:

The Page.ClientScript.RegisterClientScriptBlock method is used to register client scripts using code dynamically.

Discuss this Question


24. Which is the first event triggered when a user requests an ASP.NET page?

  1. Load
  2. Init
  3. PreInit
  4. PreLoad

Answer: C) PreInit

Explanation:

The PreInit event gets triggered when a user requests an ASP.NET page.

Discuss this Question


25. Which of the following is not an ASP.NET component?

  1. LinkCounter
  2. Counter
  3. AdRotator
  4. File Access

Answer: A) LinkCounter

Explanation:

The LinkCounter is not an ASP.NET component.

Discuss this Question


26. Which of the following Session Mode Serialization is not required to store the data?

  1. SQLServer
  2. StateServer
  3. InProc
  4. None

Answer: C) InProc

Explanation:

The InProc Session Mode Serialization is not required to store the data.

Discuss this Question


27. Which development model(s) is/are supported by ASP.Net?

  1. Asp.Net Web Forms
  2. Asp.Net MVC
  3. Asp.Net Web Pages
  4. Asp.Net API
  5. All of the above

Answer: E) All of the above

Explanation:

ASP supports many different development models:

  • Classic ASP
  • ASP.NET Web Forms
  • ASP.NET MVC
  • ASP.NET Web Pages
  • ASP.NET API
  • ASP.NET Core

Discuss this Question


28. The SessionIDs are stored in ____ by ASP.Net?

  1. Cache
  2. Server
  3. Database
  4. Cookies

Answer: D) Cookies

Explanation:

By default, the session IDs are stored in Cookies.

Discuss this Question


29. Which is the correct basic syntax of Application directive?

  1. <%@ Application Language="C#" %>
  2. <!-- Application Language="C#" -->
  3. <%@ Application_DIR Language="C#" %>
  4. <%@ DIR @Application Language="C#" %>

Answer: A) <%@ Application Language="C#" %>

Explanation:

The basic syntax of the Application directive is:

<%@ Application Language="C#" %>

Discuss this Question


30. Which is the correct basic syntax of the Assembly directive?

  1. <%@ Assembly @ Name ="myassembly" %>
  2. <%@@ Assembly Name ="myassembly" %>
  3. <%@ Assembly Name ="C# myassembly" %>
  4. <%@ Assembly Name ="myassembly" %>

Answer: D) <%@ Assembly Name ="myassembly" %>

Explanation:

The basic syntax of the Assembly directive is:

<%@ Assembly Name ="myassembly" %>

Discuss this Question


31. Which is the correct basic syntax of the Control directive?

  1. <%@ Control %>
  2. <%@ Control Language="C#" EnableViewState="false" %>
  3. <%@ Control Language="C#" %>
  4. None of the above

Answer: B) <%@ Control Language="C#" EnableViewState="false" %>

Explanation:

The basic syntax of the Control directive is:

<%@ Control Language="C#" EnableViewState="false" %>

Discuss this Question


32. What is the file extension of Webservices in ASP.Net?

  1. .aspx
  2. .asp
  3. .asm
  4. .asmx

Answer: D) .asmx

Explanation:

The file extension of Webservices in ASP.Net is .asmx

Discuss this Question


33. Which protocol is used to call a web service?

  1. SOAP Protocol
  2. HTTP Protocol
  3. TCP Protocol
  4. FTP Protocol

Answer: B) HTTP Protocol

Explanation:

In ASP.Net, HTTP protocol is used to call a web service.

Discuss this Question


34. What is the parent class of all web server control in ASP.Net?

  1. System.Web.UI.Control
  2. System.Web.Control
  3. System.Web.UI.WebServer
  4. All of the above

Answer: A) System.Web.UI.Control

The parent class of all web server control in ASP.Net is System.Web.UI.Control. The System.Web.UI.Control class can directly or indirectly be used as part of the user interface for your Web application.

Discuss this Question


35. What is the difference between session object and application object in ASP.Net?

  1. The session object is used to maintain the session of each user while an application object is created while a user enters in the application
  2. Session objects are created on the server while application objects are created on the client side.
  3. Session objects are used to handle database communication while application objects are used to handle communication between two different domains.
  4. All of the above

Answer: A) The session object is used to maintain the session of each user while an application object is created while a user enters in the application

Explanation:

The difference between a session object and an application object in ASP.Net is that: Session object is used to maintain the session of each user while an application object is created while a user enters the application.

Discuss this Question


36. What is the difference between Debug and Trace class in ASP.Net?

  1. The Debug class is used to debug both builds and releases while the Trace class is used to debug the builds only
  2. Debug class is used in ASP core while Trace is used in ASP MCC
  3. The Debug class is used to debug the builds while the Trace class is used to debug both builds and releases
  4. All of the above

Answer: C) The Debug class is used to debug the builds while the Trace class is used to debug both builds and releases

Explanation:

The difference between Debug and Trace class in ASP.Net is - The Debug class is used to debug the builds while the Trace class is used to debug both builds and releases.

Discuss this Question


37. In ____, a non-virtual method is called which is decided at a compile time.

  1. Late binding
  2. Early binding
  3. Lazy binding
  4. Global binding

Answer: B) Early binding

Explanation:

In early binding, a non-virtual method is called which is decided at a compile time.

Discuss this Question


38. In ____, a virtual method is called which is decided at runtime.

  1. Late binding
  2. Early binding
  3. Lazy binding
  4. Global binding

Answer: A) Late binding

Explanation:

In late binding, a virtual method is called which is decided at runtime.

Discuss this Question


39. Which method is used to sign out from forms authentication?

  1. Authentication.SignOut()
  2. Forms.UI.SignOut()
  3. FormsAuthentication.LogOut()
  4. FormsAuthentication.SignOut()

Answer: D) FormsAuthentication.SignOut()

Explanation:

To sign out from forms authentication - The FormsAuthentication.SignOut() method is used.

Discuss this Question


40. The ____ class is used to summarize the error messages from all validators on a Web page in a single location.

  1. ValidationSummary
  2. Validation
  3. ErrorSummary
  4. Debug

Answer: A) ValidationSummary

Explanation:

The ValidationSummary class is used to summarize the error messages from all validators on a Web page in a single location.

Discuss this Question


41. Which method is used in ASP.Net to preserve page and control values between round trips?

  1. Restore
  2. Modeling
  3. View State
  4. Model Preserve

Answer: C) View State

Explanation:

The View State method is used to preserve page and control values between round trips in ASP.Net.

Discuss this Question


42. What is the default timeout for a cookie in ASP.Net?

  1. 10 Minutes
  2. 20 Minutes
  3. 30 Minutes
  4. 5 Minutes

Answer: C) 30 Minutes

Explanation:

The default time timeout for a cookie in ASP.Net is 30 minutes.

Discuss this Question


43. What is the full form of SOAP in ASP.Net?

  1. Simple Object Access Protocol
  2. Simple Object Advanced Protocol
  3. Simple Object Access Property
  4. Simple Object Advanced Property

Answer: A) Simple Object Access Protocol

Explanation:

In ASP.Net, the SOAP stands for Simple Object Access Protocol.

Discuss this Question


44. The Global.asax file is derived from the ____ class.

  1. System.UI
  2. SoapApplication
  3. Application
  4. HttpApplication

Answer: D) HttpApplication

Explanation:

The Global.asax file is derived from the HttpApplication class.

Discuss this Question


45. Which is not a page event in ASP.Net?

  1. PreLoad
  2. Load
  3. LoadComplete
  4. UpLoad

Answer: D) UpLoad

Explanation:

"UpLoad" is not a page event in ASP.Net.

Discuss this Question


46. How many navigation controls are in ASP.NET?

  1. 2
  2. 3
  3. 4
  4. 5

Answer: B) 3

Explanation:

In ASP.Net, there are three navigation controls, they are:

  • SiteMapPath
  • Menu
  • TreeView

Discuss this Question


47. Can an ASP.Net web application run without web.config file?

  1. Yes
  2. No

Answer: A) Yes

Explanation:

Yes, an ASP.Net web application can run without web.config file.

Discuss this Question


48. Which is/are the component(s) of ADO.NET?

  1. Dataset
  2. Data Reader
  3. Data Adaptor
  4. Command
  5. Connection
  6. All of the above

Answer: F) All of the above

Explanation:

The components of ADO.Net are Dataset, Data Reader, Data Adaptor, Command, and connection.

Discuss this Question


49. In ____ page processing transfers from one page to the other page without making a round-trip back to the client's browser.

  1. Response.Redirect
  2. Server.Redirect
  3. Client.Transfer
  4. Server.Transfer

Answer: D) Server.Transfer

Explanation:

In Server.Transfer page processing transfers from one page to the other page without making a round-trip back to the client's browser.

Discuss this Question


50. ____is used to redirect the user's browser to another page or site.

  1. Response.Redirect
  2. Server.Redirect
  3. Client.Transfer
  4. Server.Transfer

Answer: A) Response.Redirect

Explanation:

Response.Redirect is used to redirect the user's browser to another page or site.

Discuss this Question


51. Which is the correct syntax to add an event handler in ASP.Net?

  1. Attributes("Event","Javascript_Code();")
  2. Attributes.Add("Event","Javascript_Code();")
  3. Attributes.Handle("Event","Javascript_Code();")
  4. None of the above

Answer: B) Attributes.Add("Event","Javascript_Code();")

Explanation:

The correct syntax to add an event handler in ASP.Net is:

Attributes.Add("Event","Javascript_Code();")

Discuss this Question


52. How many types of caching are there in ASP.Net?

  1. 2
  2. 3
  3. 4
  4. 6

Answer: B) 3

Explanation:

In ASP.Net, there are three types of caching, they are:

  • Output Caching
  • Fragment Caching
  • Data Caching

Discuss this Question


53. Which of the following statement are correct about Calendar control in ASP.NET?

  1. It is an ASP.NET control, it shows the date in a calendar format.
  2. It is an ASP.NET control, it shows date and time in UTC format only.
  3. NET supports only one calendar control on one web form.
  4. NET supports more than one calendar control on one web form.
  1. 1 and 3
  2. 2 and 4
  3. 1 and 4
  4. 2 and 3

Answer: C) 1 and 4

Explanation:

The 1st and 4th statements are correct about Calendar control in ASP.NET.

Discuss this Question


54. What is the correct syntax to create ASP.NET Calendar control?

  1. < asp:Calendar ID="Calendar1" runat="server" SelectedDate="2022-09-04"></asp:Calendar>
  2. < asp:Cal ID="Calendar1" runat="server" SelectedDate="2022-09-04" ></asp:Cal>
  3. < asp_net:Calendar ID="Calendar1" runat="server" SelectedDate="2022-09-04" ></asp_net:Calendar>
  4. < asp:Calendar CAL_ID="Calendar1" runat="server" SelectedDate="2022-09-04" ></asp:Calendar>

Answer: A) < asp:Calendar ID="Calendar1" runat="server" SelectedDate="2022-09-04"></asp:Calendar>

Explanation:

The first syntax is correct to create an ASP.NET Calendar control.

Discuss this Question


55. Using ASP.NET Calendar control, can a user move any day of any year?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, using ASP.NET calendar control, the user can move any day of any year.

Discuss this Question


56. Visual studio supports drag and drops for calendar control?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, Visual Studio supports drag and drop for calendar control.

Discuss this Question


57. Which of the following property is used to apply the style to days in Calendar control?

  1. Style
  2. DayStyle
  3. StyleDay
  4. None of the above

Answer: B) DayStyle

Explanation:

The DayStyle property is used to apply the style to days in the Calendar control.

Discuss this Question


58. Which of the following property is used to apply the style to the day header row in Calendar control?

  1. DayHeaderStyleRow
  2. DayHeaderStyle
  3. StyleHeaderDay
  4. None of the above

Answer: B) DayHeaderStyle

Explanation:

The DayHeaderStyle property is used to apply the style to the day header row in the Calendar control.

Discuss this Question


59. Can we apply the style to the month navigation button in Calendar control?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can apply the style to the month navigation button using the "NextPrevStyle" property for Calendar control.

Discuss this Question


60. Which of the following event is triggered, when we make the selection in Calendar control?

  1. Selection Change
  2. Selection Changed
  3. OnSelection Changed
  4. None of the above

Answer: B) Selection Changed

Explanation:

The SelectionChanged event is triggered when we make the selection in the Calendar control.

Discuss this Question


61. Which of the following property is used to set custom text for the next month button in Calendar control?

  1. Month Text
  2. Next Month Text
  3. Next Text Month
  4. NM Text

Answer: B) Next Month Text

Explanation:

The NextMonthText property is used to set custom text for the next month button in the Calendar control.

Discuss this Question


62. Which of the following property is not available for Calendar control in ASP.NET?

  1. Font
  2. Fore Color
  3. Title Format
  4. None of the above

Answer: D) None of the above

Explanation:

All given properties are available for Calendar control in ASP.NET.

Discuss this Question


63. Which of the following statement is correct about CheckBox control in ASP.NET?

  1. It is an ASP.NET control that is used to select a choice from the group of choices.
  2. It is an ASP.NET control that is used to select multiple choices from a group of choices.
  3. NET does not support Checkbox control in ASP.NET.
  4. None of the above

Answer: B) It is an ASP.NET control that is used to select multiple choices from a group of choices.

Explanation:

The CheckBox control is used to select multiple choices from the group of choices.

Discuss this Question


64. Is CheckBox an ASP.NET Client-Side control?

  1. True
  2. False

Answer: B) False

Explanation:

The CheckBox is a server-side control in ASP.NET.

Discuss this Question


65. Can we bind an event handler with CheckBox control in ASP.NET?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can bind an event handler with CheckBox control in ASP.NET.

Discuss this Question


66. What is the correct syntax to create ASP.NET CheckBox control?

  1. <asp:CB ID="CB1" runat="server" Text="BCA"/>
  2. <asp:Check-Box ID="CB1" runat="server" Text="BCA"/>
  3. <asp_net:CheckBox ID="CB1" runat="server" Text="BCA"/>
  4. <asp:CheckBox ID="CB1" runat="server" Text="BCA"/>

Answer: D) <asp:CheckBox ID="CB1" runat="server" Text="BCA"/>

Explanation:

The 4th syntax is correct to create an ASP.NET Calendar control.

Discuss this Question


67. Which of the following tag is used for the HTML checkbox?

  1. <check>
  2. <checkbox>
  3. <input>
  4. None of the above

Answer: C) <input>

Explanation:

The <input> tag is used to create HTML checkbox.

Discuss this Question


68. Which of the following property is used to set the check state for ASP.NET CheckBox control?

  1. Check
  2. Checked
  3. Check State
  4. None of the above

Answer: B) Checked

Explanation:

The "Checked" property is used to set the check state for ASP.NET CheckBox control.

Discuss this Question


69. Which of the following property is used to set border width for ASP.NET CheckBox control?

  1. Width
  2. Border Width
  3. Width Border
  4. None of the above

Answer: B) Border Width

Explanation:

The "BorderWidth" property is used to set border width for ASP.NET CheckBox control.

Discuss this Question


70. Can we apply ToolTip on CheckBox control?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can apply ToolTip on CheckBox control.

Discuss this Question


71. Which of the following property is used to set the font for ASP.NET CheckBox control?

  1. SetFont
  2. Font
  3. FontSize
  4. None of the above

Answer: B) Font

Explanation:

The "Font" property is used to set the font for ASP.NET CheckBox control.

Discuss this Question


72. Which of the following event is triggered on selection change for ASP.NET CheckBox control?

  1. On Selection Changed
  2. Check Changed
  3. On Check Change
  4. None of the above

Answer: B) Check Changed

Explanation:

The "CheckChanged" event is used to trigger on selection change for ASP.NET CheckBox control.

Discuss this Question


73. Which of the following statement are correct about LinkButton control in ASP.NET?

  1. The LinkButton and HyperLink both are the same controls.
  2. This control acts as a hyperlink, which is used to display a hyperlink-style button control.
  3. ASP.NET supports only LinkButton, it does not support Hyperlink.
  4. This is a client-side control used in HTML only.
  1. Only 1
  2. Only 2
  3. 1 and 4
  4. 2 and 3

Answer: B) Only 2

Explanation:

The 2nd statement is correct about LinkButton control in ASP.NET.

Discuss this Question


74. What is the correct syntax to create ASP.NET LinkButton control?

  1. <asp:LinkButton ID="ih" runat="server"/> My LinkButton </asp:LinkButton>
  2. <asp:Link ID="ih" runat="server"/> My LinkButton </asp:Link>
  3. <asp:LButton ID="ih" runat="server"/> My LinkButton </asp:LButton>
  4. <asp:Link_Button ID="ih" runat="server"/> My LinkButton </asp:Link_Button>

Answer: A) <asp:LinkButton ID="ih" runat="server"/> My LinkButton </asp:LinkButton>

Explanation:

The first syntax is correct to create an ASP.NET LinkButton control.

Discuss this Question


75. Can we implement an event handler for LinkButton?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can implement an event handler for LinkButton control in ASP.NET.

Discuss this Question


76. Which of the following property is used to set CSS Class to LinkButton control?

  1. Set Css
  2. Css Class
  3. Css
  4. Class

Answer: B) Css Class

Explanation:

The "CssClass" property is used to set the CSS class to LinkButton control.

Discuss this Question


77. Which of the following property is used to enable or disable LinkButton control?

  1. Enable
  2. Is Enable
  3. Enabled
  4. Disabled

Answer: C) Enabled

Explanation:

The "Enabled" property is used to enable or disable LinkButton control.

Discuss this Question


78. The PostBackUrl property gets or sets the URL of the page to navigate to from the current page?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, the PostBackUrl property is used to get or set the URL of the page to navigate from the current page.

Discuss this Question


79. Which of the following property is not available for LinkButton control?

  1. Border Style
  2. Causes Validation
  3. Css Class
  4. None of the above

Answer: D) None of the above

Explanation:

All the given property is not available for LinkButton control.

Discuss this Question


80. Which of the following event handlers are available for LinkButton control?

  1. On Click
  2. On Client Click
  3. On Command
  4. All the above
  1. 1 and 2
  2. 1 and 3
  3. 2 and 3
  4. 4

Answer: D) 4

Explanation:

The given event handlers are available for LinkButton control.

Discuss this Question


81. The LinkButton control makes a postback call to the server before redirecting the user to the target page.

  1. True
  2. False

Answer: A) True

Explanation:

Yes, The LinkButton control makes a postback call to the server before redirecting the user to the target page.

Discuss this Question


82. Which of the following statement is correct about FileUpload control in ASP.NET?

  1. FileUpload control is used to upload webpages for a website.
  2. FileUpload control is used to upload files from the local machine to the server.
  3. FileUpload control is used to upload on C# file to the server.
  4. None of the above

Answer: B) FileUpload control is used to upload files from the local machine to the server.

Explanation:

The FileUpload control is used to upload files from the local machine to the server.

Discuss this Question


83. What is the correct syntax to create ASP.NET FileUpload control?

  1. <asp:FileUpload ID="FU1" runat="server"/>
  2. <asp:FU ID="FU1" runat="server"/>
  3. <asp:Upload ID="FU1" runat="server"/>
  4. <asp_net:Upload ID="FU1" runat="server"/>

Answer: A) <asp:FileUpload ID="FU1" runat="server"/>

Explanation:

The first syntax is correct to create an ASP.NET FileUpload control.

Discuss this Question


84. Which of the following HTML tag is used to create file upload control in HTML?

  1. File
  2. Input
  3. Upload
  4. FP

Answer: B) Input

Explanation:

The <input> tag is used to create file upload control in HTML. The HTML syntax is given below:

	
<input name="FileUpload1" id="FileUpload1" type="file">

Discuss this Question


85. Can we upload multiple files to the server using FIleUpload control?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can upload multiple files using FileUpload control.

Discuss this Question


86. Which of the following property is used to get the selected filename using FIleUpload control?

  1. PostedFile.FileName
  2. FileName
  3. SelectedFile.FileName
  4. PostedFile

Answer: A) FileUpload1.PostedFile.FileName

Explanation:

The "FileUpload1.PostedFile.FileName" property is used to get selected filename using FileUpload control.

Discuss this Question


87. Can we create a hyperlink using an HTML tag?

  1. True
  2. False

Answer: A) True

Explanation:

The <a> tag is used in HTML to create a hyperlink.

Discuss this Question


88. Which of the following property is used to allow multiple selections of files from FileUpload control?

  1. Access Multiple
  2. Upload Multiple
  3. Select Multiple
  4. Allow Multiple

Answer: D) Allow Multiple

Explanation:

The "AllowMultiple" property is used to allow multiple selections of files from FileUpload control in ASP.NET.

Discuss this Question


89. Which of the following method is used to save the selected file using FIleUpload control?

  1. PostedFile.Upload()
  2. PostedFile.SaveAs()
  3. PostedFile.SaveFile()
  4. None of the above

Answer: B) FileUpload1.PostedFile.SaveAs()

Explanation:

The "FileUpload1.PostedFile.SaveAs()" method is used to get selected filename using FileUpload control.

Discuss this Question


90. Can we change the Height and Weight of FileUpload control?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, The "Height" and "Width" properties are used to change the Height and Weight of FileUpload control.

Discuss this Question


91. Which of the following property is used to get the length of the selected filename using FIleUpload control?

  1. PostedFile.ContentLength
  2. PostedFile.Length
  3. PostedFile.FileLength
  4. None of the above

Answer: A) FileUpload1.PostedFile.ContentLength

Explanation:

The "FileUpload1.PostedFile.ContentLength" property is used to get the length of the selected filename using FileUpload control.

Discuss this Question


92. Which of the following statement is correct about cookies in ASP.NET?

  1. Cookies are code snippets to read data from a web server.
  2. Cookies are code snippets to download data from a web server.
  3. Cookies are small pieces of data stored on the webserver
  4. Cookies are small pieces of data created by a web application while a user is browsing a website.

Answer: D) Cookies are small pieces of data created by a web application while a user is browsing a website.

Explanation:

Cookies are small pieces of data created by a web application while a user is browsing a website.

Discuss this Question


93. Which of the following statement is the correct way to store cookies in ASP.NET?

  1. Using cookies collection
  2. Using HttpCookie class
  3. Both of the above
  4. None of the above

Answer: C) Both of the above

Explanation:

We can store cookies using cookies collection and HttpCookie class in ASP.NET.

Discuss this Question


94. Cookies can store data up to?

  1. 10 KB
  2. 4 KB
  3. 1 MB
  4. 1 GB

Answer: B) 4 KB

Explanation:

We can store data up to 4KB in cookies.

Discuss this Question


95. Cookies are stored in?

  1. Main Memory
  2. Hard Drive
  3. Cache Memory
  4. CPU Registers

Answer: B) Hard Drive

Explanation:

The cookies are stored on Hard Drive.

Discuss this Question


96. Is the browser store cookies for different websites the user visited?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, the Browser stores cookies for different websites users visited.

Discuss this Question


97. Which of the following property is used to set the cookie's expiration date and time in ASP.NET?

  1. Response.Cookies ["mycookie"].ExpiresDateTime
  2. Response.Cookies ["mycookie"].Expires
  3. Response.Cookies ["mycookie"].ExpiresTime
  4. Response.Cookies ["mycookie"].RemoveDateTime

Answer: B) Response.Cookies["mycookie"].Expires

Explanation:

The "Response.Cookies["mycookie"].Expires" property is used to set the cookie's expiration date and time in ASP.NET.

Discuss this Question


98. Which of the following method is used to store a HttpCookie in ASP.NET?

  1. Response.Cookies.Add()
  2. Response.Cookies.SaveCookie()
  3. Response.Cookies.AddCookie()
  4. Response.Cookies.AddCookies()

Answer: A) Response.Cookies.Add()

Explanation:

The "Response.Cookies.Add()" method is used to store a HttpCookie in ASP.NET.

Discuss this Question


99. Which of the following property is used to get cookies value in ASP.NET?

  1. Response.Cookies["cookiename"].GetValue
  2. Response.Cookies["cookiename"].CookieValue
  3. Response.Cookies["cookiename"].GetCookieValue
  4. Response.Cookies["cookiename"].Value

Answer: D) Response.Cookies["cookiename"].Value

Explanation:

The "Response.Cookies["student"].Value" property is used to get a cookies value in ASP.NET.

Discuss this Question


100. Which of the following statement is correct about HyperLink control in ASP.NET?

  1. ASP.NET does not support HyperLink control.
  2. It is an ASP.NET control, that responds to a click event.
  3. It cannot be used to refer to a webpage on the server
  4. The hyperLink is also known as LinkButton in ASP.NET

Answer: B) It is an ASP.NET control, that responds to a click event.

Explanation:

It is an ASP.NET control, that responds to a click event.

Discuss this Question


101. What is the correct syntax to create ASP.NET hyperlink?

  1. < asp:HyperLink ID="ih1" runat="server" Text="IncludeHelp" NavigateUrl="www.includehelp.com" ></asp:HyperLink>
  2. < asp.net:HyperLink ID="ih1" runat="server" Text="IncludeHelp" NavigateUrl="www.includehelp.com" ></asp.net:HyperLink>
  3. < asp_net:HyperLink ID="ih1" runat="server" Text="IncludeHelp" NavigateUrl="www.includehelp.com" ></asp_net:HyperLink>
  4. None of the above

Answer: A) < asp:HyperLink ID="ih1" runat="server" Text="IncludeHelp" NavigateUrl="www.includehelp.com" ></asp:HyperLink>

Explanation:

The first syntax is correct to create an ASP.NET hyperlink. Here we refer <a href="http://www.includehelp.com">to www.includehelp.com</a> from the hyperlink.

Discuss this Question


102. Which of the following property is used to set the shortcut key for ASP.NET hyperlink control?

  1. Shortcut
  2. Shortcut Key
  3. Access Key
  4. Access Shortcut Key

Answer: C) Access Key

Explanation:

The AccessKey property is used to set the shortcut key for ASP.NET hyperlink control.

Discuss this Question


103. Which of the following is not a valid property for a hyperlink?

  1. Border Color
  2. Back Color
  3. Fore Color
  4. Background Color

Answer: D) Background Color

Explanation:

The BackgroundColor property is not a valid property for hyperlink control.

Discuss this Question


104. Which of the following statement is correct about ToolTip?

  1. It is used to implement a click event for ASP.NET control.
  2. It displays a text when the mouse is over the ASP.NET control.
  3. It is used to remove webpage cookies.
  4. None of the above

Answer: B) It displays a text when the mouse is over the ASP.NET control.

Explanation:

The Tooltip is used to display a text when the mouse is over the ASP.NET control.

Discuss this Question


105. The ToolTip is?

  1. An event
  2. A property
  3. An event handler
  4. None of the above

Answer: B) A property

Explanation:

The Tooltip is a property, which is used to display a text when the mouse is over the ASP.NET control.

Discuss this Question


106. Which of the following property is used to set the URL for HyperLink control?

  1. Set URL
  2. URL
  3. Navigate Url
  4. None of the above

Answer: C) Navigate Url

Explanation:

The NavigateUrl property is used to set the URL for Hyperlink control.

Discuss this Question


107. Server renders ASP.NET Hyperlink to HTML hyperlink for the browser?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, Web Server renders ASP.NET Hyperlink to HTML hyperlink for the browser.

Discuss this Question


108. Which of the following HTML tag is used for a hyperlink?

  1. <hyper>
  2. <a>
  3. <h>
  4. <hr>

Answer: B)  <a>

Explanation:

The <a> tag is used for hyperlink in HTML.

Discuss this Question


109. Which of the following statement is correct about RadioButton control in ASP.NET?

  1. It is an ASP.NET control that is used to select a choice from the group of choices.
  2. It is an ASP.NET control that is used to select multiple choices from a group of choices.
  3. ASP.NET does not support RadioButton control in ASP.NET.
  4. None of the above

Answer: A) It is an ASP.NET control that is used to select a choice from the group of choices.

Explanation:

The RadioButton control is used to select a choice from the group of choices.

Discuss this Question


110. Can we create RadioButton control using drag and drop, in Visual Studio?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can create RadioButton control using drag and drop, in Visual Studio.

Discuss this Question


111. What is the correct syntax to create ASP.NET RadioButton control?

  1. <asp:RB ID="RB1" runat="server" Text="Male" GroupName="gender"/>
  2. <asp:RD ID="RB1" runat="server" Text="Male" GroupName="gender"/>
  3. <asp:RadioButton ID="RB1" runat="server" Text="Male" GroupName="gender"/>
  4. None of the above

Answer: C) <asp:RadioButton ID="RB1" runat="server" Text="Male" GroupName="gender"/>

Explanation:

The 3rd syntax is correct to create an ASP.NET RadioButton control.

Discuss this Question


112. Can we create RadioButton using an HTML tag?

  1. True
  2. False

Answer: A) True

Explanation:

The <input> tag is used in HTML to create a RadioButton.

Discuss this Question


113. Which of the following property is used to set tab order for ASP.NET RadioButton control?

  1. Tab Order
  2. Tab Index
  3. Index
  4. Tab

Answer: B) Tab Index

Explanation:

The TabIndex property is used to set the tab order for ASP.NET RadioButton control.

Discuss this Question


114. Which of the following property is used to set visibility for ASP.NET RadioButton control?

  1. Visible
  2. Set Visibility
  3. Visibility
  4. None

Answer: A) Visible

Explanation:

The Visible property is used to set visibility for ASP.NET RadioButton control.

Discuss this Question


115. Which of the following property is used to set the group name for ASP.NET RadioButton control?

  1. Group
  2. Group Name
  3. G Name
  4. None

Answer: B) Group Name

Explanation:

The GroupName property is used to set the group name for ASP.NET RadioButton control.

Discuss this Question


116. Server renders ASP.NET RadioButon to HTML RadioButon for the browser?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, the Web Server renders ASP.NET RadioButton to HTML RadioButton for the browser.

Discuss this Question


117. Which of the following HTML tag is used for the radio button?

  1. <radio>
  2. <rd>
  3. <input>
  4. <radio button>

Answer: C) <input>

Explanation:

The <input> tag is used for radio button in HTML.

Discuss this Question


118. Can we implement a click event for RadioButton in ASP.NET?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can implement a click event for RadioButton control in ASP.NET.

Discuss this Question


119. Which of the following property is used to set the keyboard shortcut key for Label control?

  1. Shortcut
  2. Access Key
  3. Key
  4. Shortcut Key

Answer: B) Access Key

Explanation:

The AccessKey property is used to set the keyboard shortcut key for label control.

Discuss this Question


120. Which of the following property is used to set tab index for web controls?

  1. Index
  2. Tab Index
  3. Tab
  4. None of the above

Answer: B) Tab Index

Explanation:

The TabIndex property is used to set the tab index for web controls.

Discuss this Question


121. Which of the following property is used to set background color for a Label control?

  1. Back Color
  2. Background Color
  3. Bg Color
  4. None of the above

Answer: A) Back Color

Explanation:

The BackColor property is used to set the background color for a Label control.

Discuss this Question


122. What is ToolTip?

  1. It is an application event
  2. It is a property
  3. It is a method
  4. None of the above

Answer: B) It is a property

Explanation:

ToolTip is a property for web controls.

Discuss this Question


123. Which of the following property is used to set password characters for a Textbox control?

  1. Pass Char
  2. P Char
  3. Password Char
  4. None of the above

Answer: C) Password Char

Explanation:

The PasswordChar property is used to set password characters for a Textbox control.

Discuss this Question


124. How can we set the size for a Textbox control?

  1. Using Size property
  2. Using Length Property
  3. Using MaxLength Property
  4. None of the above

Answer: C) Using MaxLength Property

Explanation:

The MaxLength property is used to set the number of characters for a Textbox control.

Discuss this Question


125. The AutoPostBack is?

  1. A property
  2. An Event
  3. A Method
  4. None of the above

Answer: A) A property

Explanation:

The AutoPostBack is a property for web controls in ASP.NET.

Discuss this Question


126. Which of the following are textbox events in ASP.NET?

  1. Key Press
  2. Text Changed
  3. Post Back
  4. Text Modified
  1. 1 and 3
  2. 1 and 2
  3. 1 and 4
  4. 3 and 4

Answer: B) 1 and 2

Explanation:

The KeyPress and TextChanged are textbox events in ASP.NET.

Discuss this Question


127. Which of the following syntax is correct to create a textbox in ASP.NET?

  1. <asp:TextBox ID="txtname" runat="server"></asp:TextBox>
  2. <TextBox ID="txtname" runat="server"></TextBox>
  3. <asp.net:TextBox ID="txtname" runat="server"><asp.net/TextBox>
  4. <asp-TextBox ID="txtname" runat="server"><asp-TextBox>

Answer: A) <asp:TextBox ID="txtname" runat="server"></asp:TextBox>

Explanation:

The 1st syntax is correct to create a textbox in ASP.NET.

Discuss this Question


128. Which of the following is the correct syntax for an event handler for a Button control in ASP.NET?

  1. protected void MyButton_Click(object sender, EventArgs e){  } 
  2. protected void MyButton_Click(EventArgs e){  } 
  3. protected void MyButton_Click(object sender){  } 
  4. protected void MyButton_Click(){  }

Answer: A) protected void MyButton_Click(object sender, EventArgs e){  } 

Explanation:

The 1st syntax is correct to implement an event handler for a Button control in ASP.NET.

Discuss this Question


129. Can we validate textbox data using validation controls?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can validate textbox data using validation controls.

Discuss this Question


130. Webforms are made up using?

  1. ASPX File
  2. Code behind file (.cs, .vb etc)
  3. Both of the above
  4. None of the above

Answer: C) Both of the above

Explanation:

The webforms are made up using visual portion (.aspx file) and code behind portion (.cs file).

Discuss this Question


131. IIS stands for?

  1. Internet Information Server
  2. Internet Information Services
  3. Inter Information Server
  4. Interactive Information Services

Answer: B) Internet Information Services

Explanation:

The IIS stands for Internet Information Services.

Discuss this Question


132. IIS is a?

  1. Web Browser
  2. Web crawler
  3. Web Server
  4. None of the above

Answer: C) Web Server

Explanation:

The IIS is a web server, which is used to deploy web applications.

Discuss this Question


133. Which of the following are server controls in ASP.NET?

  1. Button
  2. Textbox
  3. ImageButton
  4. LinkButton
  1. 1 and 2
  2. 1, 2, and 3
  3. Only 1
  4. All

Answer: D) All

Explanation:

All of the given options are server controls in ASP.NET.

Discuss this Question


134. Which of the following control works as a container?

  1. Image Button
  2. Data Grid
  3. Panel
  4. Table

Answer: C) Panel

Explanation:

The Panel control is used as a container in ASP.NET.

Discuss this Question


135. Which of the following statement is correct about AdRotator control?

  1. It is not an ASP.NET web form control
  2. It is a client-side control
  3. It is used to specify a list of ads to display
  4. It is used to display only hyperlinks

Answer: C) It is used to specify a list of ads to display

Explanation:

The AdRotator control is used to specify a list of ads to display. Each time user re-displays the page.

Discuss this Question


136. Which of the following control is used to create a group of checkboxes?

  1. Check Box
  2. Check Box List
  3. Check Box Group
  4. Check Box Group List

Answer: B) Check Box List

Explanation:

The CheckBoxList control is used to create a group of checkboxes that all work together.

Discuss this Question


137. Which of the following controls has an 'ItemDataBound' Event?

  1. Data List
  2. Data Grid
  3. Repeater
  4. All

Answer: D) All

Explanation:

All the given controls have an "ItemDataBound" event.

Discuss this Question


138. Which of the following are the correct application events for DataList control?

  1. Cancel Command
  2. Edit Command
  3. Delete Command
  4. Update Command
  1. 1 and 2
  2. 1, 3, 4
  3. All
  4. None

Answer: C) All

Explanation:

All of the following are correct application events for DataList control.

Discuss this Question


139. Can we use the Click event on ImageButton similar to Button control?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can click event on ImageButton similar to the Button control.

Discuss this Question


140. Literal is a?

  1. Server-side control
  2. Application Event
  3. Client-side control
  4. None of the above

Answer: A) Server-side control

Explanation:

Literal is a server-side control, it is like a label control that displays a literal.

Discuss this Question


141. Which of the following is not HTML control?

  1. Text Field
  2. Text Area
  3. Place Holder
  4. Reset Button

Answer: C) Place Holder

Explanation:

The PlaceHolder is an ASP.NET server control, which is used to set the placeholder for the controls.

Discuss this Question


142. Which of the following tag is used to display a horizontal line?

  1. <HR>
  2. <HL>
  3. <HB>
  4. None

Answer: C) <HB>

Explanation:

The <HR> tag is used to display a horizontal line.

Discuss this Question


143. HTML controls are?

  1. Server-side controls
  2. Client-side controls
  3. Both
  4. None

Answer: B) Client-side controls

Explanation:

The HTML controls are client-side controls.

Discuss this Question


144. What is the full form of HR of <HR> tag?

  1. Horizontal Rule
  2. Horizontal Relay
  3. Horizon Relay
  4. Horizon Rule

Answer: A) Horizontal Rule

Explanation:

The HR stands for Horizontal Rule of <HR> tag.

Discuss this Question


145. Which of the following statement is correct about 'Text Area' control?

  1. It is used for multiline input on an HTML Form
  2. It is used for single-line input on an HTML Form
  3. It is not an HTML control
  4. It is an ASP.NET Server Control

Answer: A) It is used for multiline input on an HTML Form

Explanation:

The "Text Area" control is used for multiline input on an HTML form.

Discuss this Question


146. Which of the following control is used to resets all other HTML form elements on a form to a default value?

  1. Clear Button
  2. Default Button
  3. Reset Button
  4. Set Button

Answer: C) Reset Button

Explanation:

The Reset Button is used to resets all other HTML form elements on a form to a default value.

Discuss this Question


147. Can we display a picture using HTML control?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, we can display a picture or image using HTML image control.

Discuss this Question


148. Which of the following statement are correct application events for Calendar control?

  1. Selection Changed
  2. Visible Month Changed
  3. Day Render
  4. CalEvent
  1. 1, 2
  2. 1, 2, 3
  3. 1, 3
  4. 1, 4

Answer: B) 1, 2, 3

Explanation:

The Calendar control has the following application events:

  1. Selection Changed
  2. Visible Month Changed
  3. Day Render

Discuss this Question


149. Is LinkButton control used to create a button that looks similar to the hyperlink?

  1. True
  2. False

Answer: A) True

Explanation:

Yes, LinkButton control is used to create a button that looks similar to the hyperlink

Discuss this Question





Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.