ASP (Active Server Pages) Questions
Question 1. What Is Asp?
ASP stands for Active Server Pages. It is a server aspect know-how which is used to show dynamic content on internet pages. For instance you could possibly write code that may give your guests totally different data, totally different photos or perhaps a completely totally different web page relying on what browser model they’re utilizing.
Question 2. How Can You Disable The Browser To View The Code?
Writing codes inside the Tag.
Question 3. What Is A “digital Directory”?
Virtual directories are aliases for listing paths on the server. It permits shifting recordsdata on the disk between totally different folders, drives and even servers with out altering the construction of internet pages. It avoids typing a particularly lengthy URL every time to entry an ASP web page.
Question 4. Give The Comment Tags For The Following?
VBScript: REM & ‘(apostrophe)
/* */ (Multi-line comments)
Question 5. Which Is The Default Scripting Language Of Asp (server-side)?
Question 6. Which Is The Default Data Types In Vbscript?
Variant is the default data type in VBScript, which can store a value of any type.
Question 7. What Is A Variable?
Variable is a memory location through which the actual values are stored/retrieved. Its value can be changed.
Question 8. What Is The Maximum Size Of An Array?
Up to 60 dimensions.
Question 9. What Is Query String Collection?
This collection stores any values that are provided in the URL.
This can be generated by three methods:
By clicking on an anchor tag.
By sending a form to the server by the GET method.
Through user-typed HTTP address.
It allows you to extract data sent to the server using a GET request.
Question 10. What Are The Attributes Of The Tags? What Are Their Functions?
The two attributes are ACTION and METHOD:
The ACTION gives the name of the ASP file that should be opened next by which this file can access the information given in the form The METHOD determines which of the two ways (POST or GET) the browser can send the information to the server.
Question 11. What Are The Methods In Session Object?
The Session Object has only one method, which is Abandon. It destroys all the objects stored in a Session Object and releases the server resources they occupied.
Question 12. What Is Server Variables Collection?
The Server Variables collection holds the entire HTTP headers and also additional items of information about the server.
Question 13. What Is The Difference Between Query String Collection And Form Collection?
The main difference is that the Query string collection gets appended to a URL.
Question 14. What Is A Form Collection?
The Form collection holds the values of the form elements submitted with the POST method. This is the only way to generate a Form collection.
Question 15. What Are The Asp Scripting Objects?
The Dictionary object, the FileSystemObject object, Text Stream objects.
Question 16. What Happens To A Html Page?
The browser makes a HTTP request; the server gives a HTTP response to the browser and the browser converts into a HTML page.
Question 17. What Happens To Asp Pages?
The browser makes a HTTP request; the server does the processing and gives a HTML response to the browser.
Question 18. What Is Application Object?
Shares information among users of an application. Gives a notification when an application starts or ends.
Question 19. What Is The Difference Between Client-side Script And Server-side Script?
Scripts executed only by the browser without contacting the server is called client-side script. It is browser dependent. The scripting code is visible to the user and hence not secure. Scripts executed by the web server and processed by the server is called server-side script.
Question 20. What Is The Command To Display Characters To The Html Page?
Question 21. Explain The Post & Get Method Or Explain The Difference Between Them?
The POST method generates a FORM collection, which is sent as a HTTP request body. All the values typed in the form will be stored in the FORM collection.
The GET method sends information by appending it to the URL (with a question mark) and stored as A Query string collection. The Query string collection is passed to the server as name/value pair.
The length of the URL should be less than 255 characters.
Question 22. How Many Global.asa Files Can An Application Have?
Only one global.asa file and it’s positioned within the digital listing’s root.
Question 23. What Are Scripting Objects?
Objects that may improve the appliance are often called the Scripting Objects.
uestion 24. What Is The Order Of Precedence For Logical Operators?
Question 25. What Is An Err Object?
Name its properties and strategies.
Question 26. What Are Local And Global Variables?
Local variables lifetime ends when the Procedure ends. Global variables lifetime begins in the beginning of the script and ends on the finish of the script and it may be utilized by any process inside the script. Declaring a variable through the use of the key phrase PRIVATE makes the variable international inside the script, but when declared utilizing PUBLIC, then all scripts can refer the variable.
Question 27. Which Is The Default Scripting Language On The Client Side?
Question 28. What Is Html (hypertext Markup Language)?
It’s a technique by which internet pages will be constructed and usually used for formatting and linking textual content.
Question 29. What Is A Web Server?
It’s a Computer that gives Web companies on the Internet or on a neighborhood Intranet. It is designed to find, handle and ship out easy HTML pages to all different customers who entry these pages.
Question 30. What Is Session Object?
It shops details about a User’s session. Gives a notification when a consumer session begins or ends.
Question 31. What Is Server-side Includes?
It supplies additional data by which it makes the location simpler to handle. It can embody textual content recordsdata utilizing the #embody assertion, retrieve the scale and final modification date of a file, outline how variables and error messages are displayed and insert the values of HTTP variables within the web page despatched again to the browser.
Question 32. What Is A File System Object Object?
It supplies entry to the bodily file system of the net server. It will get and manipulates details about all drives in a server, folders and sub-folders on a drive and recordsdata inside a folder.
Question 33. What Is A Scripting Language?
Question 34. What Is A Dictionary Object?
It helps you to retailer and retrieve data in a versatile knowledge construction. Each worth or data saved in a Dictionary is related to a key by which the data will be retrieved.
Question 35. What Is Global.asa File?
It is textual content file that incorporates particulars about an ASP utility, equivalent to when it ought to start and finish.
Question 36. What Is An .asp File?
It is a Text File that incorporates the mixture of the next:
Question 37. What Is Response Object?
It controls the data despatched to the consumer. The numerous strategies are:
Response. Write – Sends data on to a browser.
Response.Redirect – Directs a consumer to a URL apart from the requested URL.
Response.ContentType – Controls the kind of content despatched.
Response. Cookies – Sets cookie values.
Response. Buffer – To Buffer data.
Question 38. Naming Constraints For A Variable?
It will be as much as 255 characters should begin with an alphabet should not comprise an embedded interval or full-stop.
Question 39. What Is A Text Stream Object?
It lets you entry (learn/write) the contents of textual content recordsdata saved on the net server.
Question 40. What Is Iis?
IIS is a Web Server that gives Web companies, not just for internet pages but additionally for ftp websites and video and audio companies. It integrates with the database amenities of SQL Server.
Question 41. What Is Request Object?
Gets data from the consumer. It has 5 collections by which values will be accessed.
Question 42. What Is Cookies Collection?
Cookies are textual content recordsdata that retailer details about the consumer by which the net server identifies and marks every totally different customer to a web page and determines the place a consumer has been earlier than. A cookie can retailer data solely when the consumer sends it. Individual cookies are restricted to Four KB of knowledge. The most variety of cookies allowed is 300.
Cookies are saved on shopper’s machine.
Question 43. What Is The Difference Between Cookies Collection And Form/question String Collection?
Cookie assortment doesn’t have the Count property. Cookies can have a number of values for a similar cookie identify however every worth will be referred utilizing a key whereas in a Form/Query string cookie every worth must be referred utilizing an index worth.
Question 44. What Is Server Object?
Controls the ASP execution atmosphere. It can set the period of time script can run earlier than an error happens. Converts a digital path to a bodily path on the server. Takes a consumer provided string and encode it into correct format for a URL string.
Question 45. What Is Collection?
Collection is a set of identify/worth pairs the place the data provided by the shopper is saved.
Question 46. How Will You Delete A Cookie?
By setting its Expires property to any date previous to at present Response. Cookies(“cookie identify”). Expires = Date 1.
Question 47. What Is The Function Of Buffer In Response Object?
Buffer controls the HTML output stream manually.
Question 48. How Are Scripts Executed?
ASP supplies scripting engines that execute the corresponding scripting languages on the server aspect. Scripts needs to be encoded inside the Delimiters.
Question 49. What Is Asp (energetic Server Pages)?
ASP is a server side-scripting atmosphere for constructing dynamic and interactive internet pages. Since the scripts run on the server aspect, the net server does all of the processing.
Question 50. What Are Arrays?
Arrays are variables that retailer objects of comparable data.DIM ARRAY1 (4) (declares an array with the identify array1 with 5 components).
Question 51. What Is Application-scope?
Application-scope implies that variables (and objects) will be accessed from any ASP pages which can be a part of the appliance.
Question 52. What Are The Types Of Html?
Static HTML Browser makes use of HTTP to request HTML file from the Web Server.
Dynamic HTML Browser makes use of HTTP to request an executable utility moderately than a Static HTML file.
Question 53. What Are The Properties Of Session Object?
SessionID returns the session identification quantity for every consumer.
Timeout units the timeout interval assigned to the Session object for any utility, in minutes.
Codepage determines the code web page that will probably be used to show content.
LCID a locale identifier, which determines time zone and language, guidelines for the system.
Question 54. What Are The Event Handlers Of Session Object?
Session _On Start This occasion will probably be fired when a brand new consumer begins a session with the web page.
Session_OnEnd This occasion is named every time a session terminates.
Question 55. Name The Asp Objects?
Question 56. What Are The Advantages Of Using Asp?
Minimizes community traffic by limiting the necessity for the browser and server to speak to one another.
Makes for faster loading time since HTML pages are solely downloaded.
Allows working applications in languages that aren’t supported by the browser.
Can present the shopper with knowledge that doesn’t reside on the shopper’s machine.
Provides improved safety measures for the reason that script can’t be seen by the browser.
Question 57. What Are The Methods In Application Object?
Lock prevents shoppers from modifying the variables saved within the Application object.
Unlock removes the lock from variables saved within the Application object.
Question 58. What Are The Browsers That Can Access Asp Pages?
Question 59. How Does The Server Identify And Execute The Server-side Scripts Within Html Code?
Including the RUNAT=SERVER attribute
Question 60. What Are The Methods By Which Output Stream Is Controlled?
Flush sends earlier buffered output to the shopper instantly, however continues processing the script.
Clear erases any already-buffered HTML.
End causes the server to cease processing the script.
Question 61. What Are The Properties Used To Control The Expiration Of The Page?
Expires specifies the variety of minutes earlier than a web page cached on a browser expires.
Expires Absolute units the date and time at which a web page cached on a browser expires.
Question 62. What Are The Collections Of Session Object?
Contents assortment incorporates all of the variables established for a session with out utilizing the tag.
Static assortment incorporates all of the objects created.
Question 63. What Is The Difference Between Asp And Html? Or Why Asp Is Better Than Html?
ASP execute code on the server aspect whereas the browser interprets HTML.
ASP can use any scripting languages.
Gets suggestions from the consumer and return data to the consumer.
Create pages that will probably be custom-made to show solely issues that will probably be of curiosity to a specific consumer.
Can edit contents of an online web page by updating a textual content file or a database moderately than the HTML code itself.
Question 64. What Are The Event Handlers Of Application Object?
Application_OnStart- This occasion will probably be fired when the primary customer hits the web page.
Application_OnEnd- This occasion runs when the server is stopped.
Question 65. What Are The Tasks Performed By < Form > Tags?
Tags supplies area for the consumer to enter values.
the shape has a button to submit data again to the server.
It transfers management to a different ASP web page.
It carries the data within the fields to a different ASP web page.
Question 66. What Are The Tags Necessary To Be Present Within The <kind > Tag?
—–tag: Provides enter areas (textual content bins, combo bins, radio button, and many others.) on a kind referred to as fields. It has three attributes TYPE, NAME and VALUE. TYPE supplies the traits of the sphere and the NAME specifies a reputation to the sphere by which it may be referred.
Question 67. What Are The Collections Of Application Object?
Contents assortment – incorporates all variables added through scripts in international.asa.
Static assortment – incorporates the names of all objects.
Question 68. How Do You Create A Record Set Object In Vbscript?
Create Record set object.
Place kind discipline worth in a variable named “param”.
Define question by concatenating strings and variable worth.
Open Record Set Object. Note that the primary parameter is the Command Text. The second parameter is the Connection String. The Command Object and Connection Object are created implicitly.
Make positive the Record Set isn’t empty.
Begin executing a loop which fits by all information within the Record Set.
Write every document’s “first name” and “last name” fields to the web page on a separate line.
Move to Next Record.
Question 69. Explain The Difference Between Post And Get Method?
GET requests are string knowledge that’s seen to the tip consumer through the URL and a restrict of 2kb, POST requests don’t have any restrict on whole knowledge and the consumer can’t see the information in a question string.
Question 70. Why Do We Use Option Explicit?
This assertion forces the declaration of variables in VB earlier than utilizing them.
Question 71. How Do You Write An Sql Insert Statement?
Insert into desk identify (discipline, discipline, discipline) Values (’dataA’, ‘dataB’, ‘dataC’);
Question 72. How Can You Have Different Number Of Cells For Each Row Of A Table In Html?
Using colspan and rowspan.
Question 73. What Variable Can You Use To Share Info Across The Whole Application For One User?
Use the classes object
Question 74. What Is String Concatenation Function In Vbscript?
The ampersand image and ampersand area underscore throughout a number of strains.
doc.varieties [’formName’].components [’combo Name’].choices[i].worth
Question 76. What Is A Class In Css?
Class is a baby to the id, id needs to be used solely as soon as, a css class can be utilized a number of instances:
Question 77. When Inserting Strings Into A Sql Table In Asp What Is The Risk And How Can You Prevent It?
SQL Injection, to forestall you in all probability wants to make use of Stored Procedures as a substitute of inline/in code SQL.