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.
Questions
How do you change the text color of an element?
- text-color:
- font-color:
- color:
- fgcolor:
Which is the best forward only read only cursor available to read the data
- DataReader
- DataAdapter
- DataSet
- None of the above
Which attribute would you use to make the class variable being Non-serializable
- Serialized
- OptionalAttribute
- NonSerializable
- Deserialized
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?
- HTML Server control
- Web Server Control
- HTML Control
- None of the above
What would you do to the object which is expected to be no -longer in use
- Declare as null
- Declare as Null and Call the dispose method
- Call GC.SupressFinalize method for the object
- None of the above
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
- if(stringValue == null)
- if(string.IsNullOrEmpty(stringValue))
- if(stringValue == DbNull.value)
- None of the above
Why would you not use System.Web.Mail instead of System.Net.Mail
- It does not cover all the functions as covered by System.Net.Mail
- It is obsolete as compared to System.Net.Mail
- It is not secure way of sending mails.
- None of the above
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
- Binary
- XML
- Soap
- None of the above
PHP stands for :
- Personal Home Page
- Personal Hypertext Processor
- PHP: Hypertext Preprocessor
- Private Home Page
PHP server scripts are surrounded by delimiters, which?
- <&>...</&>
- <?php>...</?>
- <?php…?>
- <script>...</script>
How do you write "Hello World" in PHP
- printf("Hello World")
- echo "Hello World";
- "Hello World";
- Document.write("Hello World");
All variables in PHP start with which symbol?
- @
- #
- &
- $
- %
How do you get information from a form that is submitted using the "get" method?
- Request.Form;
- Request.QueryString;
- Request_Get("");
- $GET[]
- $_GET[];
What is the correct way to include the file "time.inc" ?
- <?php include_file("time.inc"); ?>
- <% include file="time.inc" %>
- <?php require("time.inc"); ?>
- <!--include file="time.inc"-->
By which variable we can retrieve the value passed by the GET and POST Method?
- $_REQUEST[]
- $_GET[]
- $_POST[]
- $_SESSION[]
If the file named wrongFile.php doesn't exist,then what will happen?
- Will run smoothly
- Will generate fetal error.
- Generate error and continue executing.
- Stop the running.
Which is the correct syntax for connecting the mysql database in php?
- mysql con=new mysql("Connection string")
- mysql("database name");
- mysql_connect("database name")
- mysql_connect("database",username,password)
In PHP you can use both single quotes ( ' ' ) and double quotes ( " " ) for strings:
- True
- False