PHP and .NET Web Development Basics

Covers fundamental concepts in PHP web programming and .NET web application development, including syntax, database connections, form handling, and web-specific controls.

18 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

How do you change the text color of an element?

  1. text-color:
  2. font-color:
  3. color:
  4. fgcolor:
Question 2 Multiple Choice (Single Answer)

Which is the best forward only read only cursor available to read the data

  1. DataReader
  2. DataAdapter
  3. DataSet
  4. None of the above
Question 3 Multiple Choice (Single Answer)

Which attribute would you use to make the class variable being Non-serializable

  1. Serialized
  2. OptionalAttribute
  3. NonSerializable
  4. Deserialized
Question 4 Multiple Choice (Single Answer)

Which type of control should I use when i want to display a certain information from database but it layout which can be purely HTML based?

  1. HTML Server control
  2. Web Server Control
  3. HTML Control
  4. None of the above
Question 5 Multiple Choice (Single Answer)

What would you do to the object which is expected to be no -longer in use

  1. Declare as null
  2. Declare as Null and Call the dispose method
  3. Call GC.SupressFinalize method for the object
  4. None of the above
Question 6 Multiple Choice (Single Answer)

How would you be best able to check a string value for null? String value is to be checked before setting value from DataSet which is having value as per database

  1. if(stringValue == null)
  2. if(string.IsNullOrEmpty(stringValue))
  3. if(stringValue == DbNull.value)
  4. None of the above
Question 7 Multiple Choice (Single Answer)

Why would you not use System.Web.Mail instead of System.Net.Mail

  1. It does not cover all the functions as covered by System.Net.Mail
  2. It is obsolete as compared to System.Net.Mail
  3. It is not secure way of sending mails.
  4. None of the above
Question 8 Multiple Choice (Single Answer)

I want to transfer any information over the network from one system to other system. Considering the plaform independence WHICH serialization technique should I choose

  1. Binary
  2. XML
  3. Soap
  4. None of the above
Question 9 Multiple Choice (Multiple Answers)

PHP stands for :

  1. Personal Home Page
  2. Personal Hypertext Processor
  3. PHP: Hypertext Preprocessor
  4. Private Home Page
Question 10 Multiple Choice (Multiple Answers)

PHP server scripts are surrounded by delimiters, which?

  1. <&>...</&>
  2. <?php>...</?>
  3. <?php…?>
  4. <script>...</script>
Question 11 Multiple Choice (Multiple Answers)

How do you write "Hello World" in PHP

  1. printf("Hello World")
  2. echo "Hello World";
  3. "Hello World";
  4. Document.write("Hello World");
Question 12 Multiple Choice (Multiple Answers)

All variables in PHP start with which symbol?

  1. @
  2. #
  3. &
  4. $
  5. %
Question 13 Multiple Choice (Multiple Answers)

How do you get information from a form that is submitted using the "get" method?

  1. Request.Form;
  2. Request.QueryString;
  3. Request_Get("");
  4. $GET[]
  5. $_GET[];
Question 14 Multiple Choice (Multiple Answers)

What is the correct way to include the file "time.inc" ?

  1. <?php include_file("time.inc"); ?>
  2. <% include file="time.inc" %>
  3. <?php require("time.inc"); ?>
  4. <!--include file="time.inc"-->
Question 15 Multiple Choice (Multiple Answers)

By which variable we can retrieve the value passed by the GET and POST Method?

  1. $_REQUEST[]
  2. $_GET[]
  3. $_POST[]
  4. $_SESSION[]
Question 16 Multiple Choice (Multiple Answers)
If the file named wrongFile.php doesn't exist,then what will happen?
  1. Will run smoothly
  2. Will generate fetal error.
  3. Generate error and continue executing.
  4. Stop the running.
Question 17 Multiple Choice (Multiple Answers)

Which is the correct syntax for connecting the mysql database in php?

  1. mysql con=new mysql("Connection string")
  2. mysql("database name");
  3. mysql_connect("database name")
  4. mysql_connect("database",username,password)
Question 18 True/False

In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:

  1. True
  2. False