C# Questions

C# ASRNET

Question 1 The default event for the ListBox web control is? Answer

Question 2 What attribute must be set on a validator control for the validation to work? Answer

Question 3 Which of the following Web controls is most appropriate to create a link to another Web page? Answer

Question 4 Where is the banner ad information stored? Answer

Question 5 Write the necessary C# code that creates a Table web control, adds one row with two cells, displays your first name in the first cell, and your last name in the second ceII. Answer

Question 6 Assume that you want to redirect the user to page3.aspx page and also hide the page name and other information; Which will be the correct syntax to use?Answer

Question 7 What method is used to remove all the items in a Drop-down List control? Answer

Question 8 Let chkltems be a CheckBoxList web control. Write the necessary C# statements that display all selected items of check box list control in a Label web control named lbIDisplay. Answer

Question 9 Which of the following controls let the user pick a combination of options? Answer

Question 10 Which of the following Web server controls is probably used most often than other controls for both input and output? Answer

Question 11 How do you manage states in ASRNET application? Answer

Question 12 Which of the following Page methods is used to handle errors programmatically?Answer

Question 13 You configure the session state using?Answer

Question 14 In which exception handling block do you write the code that may generate exceptions?Answer

Question 15 Which of the following should you use to program web server controls?Answer

Question 16 What is the correct extension for a web form page?Answer

Question 17 Which of the following Web server controls allow the user to choose from mutually exclusive options?Answer

Question 18 Every new web form in ASRNET derives from?Answer

Question 19 Which object allows you to send HTTP response data to a client and contains information about that response?Answer

Question 20 Which of the following controls allow you to create dynamic pages that provide more than one possible view?Answer

Question 21 Which is the best way to verify that your application is performing properly or to track down logic errors?Answer

Question 22 What is the name of the Web page property that you can query to determine that a Web page is being requested without data being submitted?Answer

Question 23 Write the necessary 0# code for a web form that uses cross-posting to display the information send to it from another
web form. The sender form uses a text box named txtUserName to allow the user to enter the user name. The destination form should display user name in a label control named IbIUserName.Answer

Question 24 Write the necessary C# statements that create a session variable named cart, and store a List object named mycart in the session variable. Put this code within the Load event.Answer

Question 25 Which of the following controls display an image that responds to mouse clicks?Answer Question 26 Which property is
used to uniquely identify the web controls?Answer

Question 27 What property of the calendar control is used to capture the data that the user clicked?Answer

Question 28 ASRNET includes the C# code?Answer

Question 29 Application events are defined in?Answer

Question 30 What is the name of the event handler that activates when the page is visited?Answer

Question 31 You noticed that 1‘clicking a CheckBox does not cause a PostBack; you need the CheckBox to PostBack so you can update the Web page based on server-side code; How do you make the CheckBox cause a PostBack?Answer

Question 32 You want to make a configuration setting change that will affect only the current Web application; Which file will you change?Answer

Question 33 Write the necessary C# statements that display in a label control named IbIDispIay the message “First time” only when the page is loaded for the first time

Put this code within the appropriate event.Answer

Question 34 Which Validation control is the best choice to ensure that zip code values entered in a form are all numeric?Answer

Question 35 Which ASRNET object is used to store data that last as long as the ASRNET application is alive?Answer

Last Updated on February 11, 2019 by EssayPro