As someone who has recently dealt alot with the topic in my own programs, it seems reasonable that other may have the same questions I did.
You can write ASP in JavaScript
Most people who write ASP write the server side programming in VBScript, and use JavaScript for the client side. While this is a very functional way, and often times easier way to do it, it is not the only way.
Again, You can write ASP in JavaScript
(or JScript if you are using IIS).
[color green]ASP really is only a collection of objects,methods, properties that apply to certain server objects that the webserver can utilize.[/color] How you choose to access these objects is up to you.
Example:
response.write "Test" will work in VBScript.
Response.Write ('Test'); in JavaScript.
The Response object and it's Write method are what is ASP. How you reference them is dependent on the language (i.e.Case Sensitivity, semicolons, etc.....)
The key is to separate the differences between what is ASP and what is the language.
A recent example is use the now() function in VBScript.
This is because the date function is dependent on the lanauge not on ASP.
Bottom line is, ASP can be done in a large variety of languages. And while VBScript is the most common (Becuase Microsoft pushes ASP vice JSP) it is not the only option. So you don't have to learn a new scripting language to utilize the power of ASP. You just have to learn how to adapt it's objects to your language of choice.
As a addition(becuase someone requested some more examples) here you go
Accessing the Request Object
JavaScript:
Request.QueryString("itemname");
Request.Form("itemname");
Request.Cookies("itemname");
Request("itemname");
All the real difference here is that becuase JavaScript is case sensitive, you need to watch that.
Alot of people are apparently also confused by differentiang between client and server side script
Client Side:
<script language="JavaScript">
alert('This is a test'):
document.form.field.value='test';
</script>
Notice, the alert command and the document object can only be referenced on the client side. But again, these will always be in script tags like those shown above.
Server Side:
<%
if (Request.Form("name")) {
Response.Write ("This is a test");
}
$>
Server side content looks much like it would with VBScript. Again, the main part is learing what is actually part of the ASP Server Objects, and what is the language used to access those.
If you have any question please let me know. And as I come across new things I will make sure to put them out here for you.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.