IT Web Development 508
![]() |
![]() |
![]() |
Title of test:![]() IT Web Development 508 Description: IT Web Development 508 |




New Comment |
---|
NO RECORDS |
Which of the following languages are used to write server side scripting in ASP .NET?. C-sharp. VB. Both c-sharp and VB. C++. In which of the following format, output will be rendered to a browser when an .aspx page is requested from the web server?. JSP. WML. XML. HTML. The first event to be triggered in an aspx page is. Page_Load(). Page_Init(). Page_click(). Postback occurs in which of the following forms. Winforms. HTMLForms. Webforms. What namespace does the Web page belong in the .NET Framework class hierarchy?. System.web.UI.Page. System.Windows.Page. System.Web.page. The type of code found in Code-Behind class is. Server-side code. Client-side code. Both A. and B. None of the above. Which of the following denote the property in every validation control?. Control To Validate property. Text property. Both A. and B. None of the Above. What is the base class from which all Web forms inherit?. Master Page. Page Class. Session Class. None of the Above. The first event triggers in an aspx page is. Page_lnit(). Page_Load(). Page_click(). What class does the ASP .NET Web Form class inherit from by default?. System.Web.UI.Page. System.Web.UI.Form. System.Web.GU1.Page. System.Web.Form. Attribute must be set on a validator control for the validation to work. ControlToVa1idate. ControlToBind. ValidateControl. Validate. What is used to validate complex string patterns like an e-mail address?. Extended expressions. Basic expressions. Regular expressions. Irregular expressions. An alternative way of displaying text on web page using. asp:label. asp:listitem. asp:button. Which of the following ASP.NET object encapsulates the state of the client?. Session object. Application object. Response object. Server object. Which of the following control is used to validate that two fields are equal?. RegularExpressionValidator. CompareValidator. equals() method. RequiredFie1dVa1idator. What will be the correct output for the given code snippet? class maths { int fact(int n) { int result; if (n == 1) return 1; result = fact(n - 1) * n; return result; } } class Output { static void main(String args[]) { maths obj = new maths() ; Console.WriteLine(obj.fact(4)*obj.fact(2)); } }. 64. 60. 120. 48. What will be the output for the given set of code? class A { public int i; public void display() { Console.WriteLine(i); } } class B: A { public int j; public void display() { Console.WriteLine(j); } } class Program { static void Main(string[] args) { B obj = new B(); obj.i = 1; obj.j = 2; obj.display(); Console.ReadLine(); } }. 0. 2. 1. Compile time error. In Inheritance concept, which of the following members of base class are accessible to derived class members?. static. protected. private. shared. What would be output for the set of code? class maths { public int x; public double y; public int add(int a, int b) { x = a + b; return x; } public int add(double c, double d) { y = c + d; return (int)y; } public maths() { this.x = 0; this.y = 0; } } class Program { static void Main(string[] args) { maths obj = new maths(); int a = 4; double b = 3.5; obj.add(a, a); obj.add(b, b); Console.WriteLine(obj.x + " " + obj.y); Console.ReadLine(); } }. 4, 3.5. 8, 0. 7.5, 8. 8, 7. The process of defining two or more methods within the same class that have same name but different parameters list?. Method overloading. Method overriding. Encapsulation. None of the mentioned. What will be the output of the following C# code? 1. class sample 2. { 3. public int i; 4. public int[] arr = new int[10]; 5. public void fun(int i, int val) 6. { 7. arr[i] = val; 8. } 9. } 10. class Program 11. { 12. static void Main(string[] args) 13. { 14. sample s = new sample(); 15. s.i = 10; 16. sample.fun(1, 5); 17. s.fun(1, 5); 18. Console.ReadLine(); 19. } 20. }. sample.fun(1, 5) will not work correctly. s.i = 10 cannot work as i is ‘public’. sample.fun(1, 5) will set value as 5 in arr[1]. s.fun(1, 5) will work correctly. To make a list that lists the items with square bullets, we can use. <ul type=square>. <square>. <li type=square>. <ol class=square>. CSS style rules for web documents can be defined: within style tags in the document. inline in the body of the document. In an external .css file. All of the above. MasterPage cannot be directly accessed from the client and just acts as a template for the other Content Pages. True. False. What are the dimensions (#rows x #columns) of this table <table border="1"><tr><td>100</td><td>200</td><td>300</td></tr></table>?. 2 x 2. 1 x 3. 2 x 1. 3 x 1. In HTML headings are defined with the <h1> to <h6> tags. True or false, <h1> defines the largest heading and <h6> defines the smallest heading. True. False. What is the process of defining a method in terms of itself, that is a method that calls itself?. Polymorphism. Abstraction. Encapsulation. Recursion. Which of these can be overloaded?. Constructors. Methods. Both Constructors & Methods. None of the mentioned. What will be the output of the following C# code? 1. class Program 2. { 3. static void Main(string[] args) 4. { 5. Console.WriteLine( vol(10)); 6. Console.WriteLine( vol(2.5f, 5)); 7. Console.WriteLine( vol( 5l, 4, 5)); 8. Console.ReadLine(); 9. } 10. static int vol(int x) 11. { 12. return(x * x * x); 13. } 14. static float vol(float r, int h) 15. { 16. return(3.14f * r * r * h); 17. } 18. static long vol(long l, int b, int h) 19. { 20. return(l * b * h); 21. } 22. }. 1000 ,39.25,1020. 1050,40,1020. 1500,39,1020. Public class is accessible outside the class through object reference. True. false. Within a class if you create an object of same class then you can access all data members through object reference even private data too. True. False. What will be the output of the following C# code? class overload 2. { 3. public int x; 4. int y; 5. public int add(int a) 6. { 7. x = a + 1; 8. return x; 9. } 10. public int add(int a, int b) 11. { 12. x = a + 2; 13. return x; 14. } 15. } 16. class Program 17. { 18. static void Main(string[] args) 19. { 20. overload obj = new overload(); 21. overload obj1 = new overload(); 22. int a = 0; 23. obj.add(6); 24. obj1.add(6, 2); 25. Console.WriteLine(obj.x); 26. Console.WriteLine(obj1.x); 27. Console.ReadLine(); 28. } 29. }. 7,8. 8. 7. If we define the CSS rule p {font-weight: bold} in an HTML document, then. all text in the document will be bold face. each paragraph will be in bold face. only paragraphs starting with the <font> tag will be in bold face. none of the above. What is the correct CSS for adding a background color?. {body: color="yellow"}. body {background-color: <Yellow>}. body {background-color: yellow}. <body backgroundcolor="yellow">. What is the correct HTML for referring to an external style sheet?. <style src="mystyle.css">. <stylesheet>mystyle.css</stylesheet>. <link rel="stylesheet" type="text/css" href="mystyle.css">. Where in an HTML document is the correct place to refer to an external style sheet?. In the <body> section. At the end of the document. At the top of the document. In the <head> section. Which CSS property is used to change the text color of an element?. text-color. fgcolor. color. Exam Date: 26/6/2022. check here. Server-side validation is preferable for developers rather than client-side validation. A. True. B. False. Where in an HTML document is the correct place to refer to an external style sheet?. A. In the <body> section. B. At the end of the document. C. At the top of the document. D. In the <head> section. Which HTML tag is used to define an internal style sheet?. A. <style>. B. <script>. C. <css>. Which HTML attribute is used to define inline styles?. A. Font. B. Style. C. Class. D. Styles. Which is the correct CSS syntax?. A. {body:color=black;}. B. body:color=black;. C. {body;color:black;}. D. body {color: black;}. What does ASP stand for?. A. Active Server Pages. B. Active Standard Pages. C. All Standard Pages. CompareValidator control can be used for performing which task?. A. To perform a data type check. B. To compare the value entered into a form field against a fixed value. C. To compare the value of one form field against another. D. All of the above. What is the correct HTML for referring to an external style sheet?. A. <style src="mystyle.css">. B. <stylesheet>mystyle.css</stylesheet>. C. <link rel="stylesheet" type="text/css" href="mystyle.css">. CompareValidator control can be used for performing which task.?. A. To perform a data type check. B. To compare the value entered into a form field against a fixed value. C. To compare the value of one form field against another. D. All of the above. Which CSS property is used to change the text color of an element?. A. text-color. B. fgcolor. C. color. Which ado.net class provide disconnected environment?. A. DataReader. B. DataSet. C. Command. D. None of the above. How do you display hyperlinks without an underline?. A. a {underline:none;}. B. a {decoration:no-underline;}. C. a {text-decoration:no-underline;}. D. a {text-decoration:none;}. ASP.NET validation controls works (handle validation) at. A. Client side only. B. Server side only. C. Both client side and server side. D. None of the above. ______________is the first method that is fired during the page load. A. PreRender(). B. Load(). C. Unload(). D. Init(). What is the correct CSS for adding a background color?. A. {body: color="yellow"}. B. body {background-color: <Yellow>}. C. body {background-color: yellow}. D. <body backgroundcolor="yellow">. HTML is what type of language?. A. Scripting Language. B. Markup Language. C. Programming Language. D. Network Protocol. What data type is returned when calling the ExecuteScalar method of a command object?. A. System.Int32. B. Object. C. No of effected records. D. None of the above. Each table header is defined by a ____ tag. A. <cell> ... </cell>. B. <tr> ... </tr>. C. <th> ... </th>. D. <td> ... </td>. HTML web pages can be read and rendered by _________. A. Compiler. B. Server. C. Web Browser. D. Interpreter. If you want to validate the email addresses, Social Security numbers, phone numbers, and dates types of data, which validation control will be used?. A. RegularExpressionValidator. B. CompareValidator. C. RequiredFieldValidator. D. None of the above. What is/are the advantages of master page?. A. It helps to display common content in multiple pages. B. They allow you to centralize the common functionality of your pages so that you can make updates in just one place. C. It helps to create a common page layout. D. All of the above. In HTML headings are defined with the <h1> to <h6> tags. <h1> defines the largest heading and <h6> defines the smallest heading. A. True. B. False. What will be the output of the following C# code?. 8, 1. 8. 1. 1,8. What are the Command Object Methods?. A. ExecuteNonQuery. B. ExecuteReader. C. ExecuteScalar. D. All of the above. _____________is a property common in every validation control. A. ValidationExpression. B. InitialValue. C. ValueToCompare. D. ControlToCompare. E. ControlToValidate. Which protocol is used for requesting a web page in ASP.NET from the Web Server?. A. HTTP. B. TCP. C. SMTP. D. None of the above. You can add as many ContentPlaceHolders to a Master Page as you need. A. True. B. False. What is the fully qualified name of the base class of all server controls?. C. System.Web.UI.Control. D. System.Web.UI. E. System.Control. Which validation control in ASP.NET can be used to determine if the data is entered into a TextBox control is of type Currency?. A. ValidationSummary. B. CompareValidator. C. RequiredFieldValidator. D. None of the above. Which is the correct HTML statement to display H20 in a paragraph?. A. <p>H<sup>2</sup>O</p>. B. <p>H<ins>2</ins>O</p>. C. <p>H<below>2</below>O</p>. D. <p>H<sub>2</sub>O</p>. Which SqlCommand execution returns the number of effected records in the table?. A. ExecuteNonQuery. B. ExecuteReader. C. ExecuteXmlReader. D. ExecuteScalar. MasterPage cannot be directly accessed from the client and just acts as a template for the other Content Pages. A. True. B. False. What are the dimensions (#rows x #columns) of this table <table border="1"><tr><td>100</td><td>200</td><td>300</td></tr></table>?. A. 2 x 2. B. 1 x 3. C. 2 x 1. D. 3 x 1. How will you create the SQL Server Connection Objects in Code? Choose the correct option. A. SqlConnection con = new SqlConnection ("Data Source=ServerName; Initial Catalog=DatabaseName;Integrated Security=True");. B. SqlConnection con = new SqlConnection(); con.ConnectionString = ("Data Source=ServerName; Initial Catalog=DatabaseName;Integrated Security=True");. C. All of the above. Among the following, which is the HTML paragraph tag?. A. <p>. B. <pre>. C. <hr>. D. <a>. Which feature of OOP indicates code reusability?. A. Abstraction. B. Polymorphism. C. Encapsulation. D. Inheritance. There is a button on page name cancel and it should bypass validation when cancel button is clicked. What will you do?. A. set CausesValidation = false. B. set RemoveValidation=true. C. set cancel=true. D. None of the above. Which access specifier is usually used for data members of a class?. A. Protected. B. Private. C. Public. D. Default. Which of the following best describes member function overriding?. A. Member functions having the same name in derived class only. B. Member functions having the same name and different signature inside main function. C. Member functions having the same name in base and derived classes. D. Member functions having the same name in base class only. Which among the following is not a necessary condition for constructors?. A. Its name must be same as that of class. B. It must not have any return type. C. It must contain a definition body. D. It can contains arguments. What is/are true about master page? Choose the correct option. A. You can add more than one master page in a website. B. Master page can be nested. C. ContentPlaceHolder control is required on a content page. D. Both A and B options are correct. How to insert Hyperlink in HTML Page?. A. <a href="https://www.google.com/">HTML MCQ</a>. B. <a target="https://www.google.com/1000-html-questions-answers/" HTML Quiz />. C. <a src="https://www.google.com/1000-html-questions-answers/">HTML Test</a>. D. <a>https://www.sanfoundry.com/1000-html-questions-answers/</a>. The following code will be executed as the following. A. Base Class Constructor executed, Child Class Constructor executed, write method in Base Class executed. B. Child class constructor executed, Write method in base class executed. C. Run time error. Treeview control is a part of which Control grouping in ASP.NET. A. Data Controls. B. Navigation Controls. C. Validation Controls. D. Standard Controls. To make a list that lists the items with square bullets, we can use. A. <ul type=square>. B. <square>. C. <li type=square>. D. <ol class=square>. Which is the correct syntax to include comment in an HTML document?. A. //. B. /* Comment */. C. // Comment //. D. <!-- Comment -->. |