Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
Search the Tips
Tip Bank > Visual Basic > VBScript

VBScript - Page 3

41-60 of 95     Previous     Next
Make Variable Available to All Pages
by DevX Pro
Can I use a global variable in VBScript and make it accessible from any Web page?
Always Use Option Explicit
by Deepak Pant
You should always use Option Explicit statement in your .asp file. ...
Counter in For-Next Statement
by Deepak Pant
It is always easy for people who know Visual Basic to write code ...
Using Recordset::GetString()
by Deepak Pant
You can use GetString() method of ADODB.Recordset object if you want to ...
Access Client's Windows Date Format
by DevX Pro
I have a date field on my ASP page. I want to restrict the user for entering only the dates in his Windows 95 machine's date format. How can I validate the date when I am using VBScript in my ASP page for client-side processing?
Display Currency Fields in ASP
by DevX Pro
I am querying an Oracle field that comes back in the format of 25.5. Because this is a currency field, I'd like to manipulate it so that it shows $25.50 before I publish it out to the Web. How can I do this?
Generate Numbers at the Server End
by DevX Pro
How do I generate numbers at the server end? I have an application in which I am accessing data from an Access database and I want to define each record fetched in a separate class. I don't know how many records can be in the table, so I would have to generate the "id" parameter of the tag automatically.
Session Abandon Does Not Stop Back Button
by DevX Pro
I have a session variable that keeps track of a user name and is set through a login page. Every page in the application first checks for the session variable and redirects to the login page if empty. I have a log out button that calls session.abandon and redirects to the home page. If the user logs out, then clicks the back button on the browser, it seems like session variables still exist. However, if the user logs out, then manually types in the address of one of the pages, it correctly redirects the user to the login page.
Use VBScript Split Function with Multi-Select Controls
by William Wen
When you have a multi-select control, your request variable for the control will be comma delimited. An easy way to retrieve each option value is to use the VBScript Split function. Split basically ...
Format a Date as mm/dd/yyyy
by DevX Pro
I need a VBScript function that will format a date as mm/dd/yyyy. The FormatDateTime function does not give me this option and the CDate function wants to convert everything into mm/dd/yy. How can I do this?
Using URLEncode to Pass Query String Values
by DevX Pro
I'm passing a string from one ASP template to another. The string may contain spaces so I call URLEncode, which works well as far as preventing the 400 Error for a malformed page. However, when I encode the Query String, it seems to muck up the code that gets the values from the Query String. Is there a "decode" function that I need to use?
You Don't Need HTML Comment Tags When you use VBScript in an ASP Environment
by Jai Bardhan
All ASP scripts are processed on the server side. Therefore, you don't need to include HTML comment tags to hide the scripts from browsers that do not support scripting, as is often done with ...
Test for NULL Properly in a Recordset
by DevX Pro
I have a column in SQL Server created like this: "vchrFirstName varchar (50) NULL" However, this code does not produce anything, including any errors, when the record is NULL: If RS("chrFirstName") = NULL Then Response.Write("Empty") Else Response.Write(RS("vchrFirstName")+"...some extra text") End If Strangely, the statement after Else is executed and nothing is printed to the Web page, but I know the record is NULL because a CStr does not work on it as expected. Also, everything after RS("vchrFirstName") is not responsed to the client as well. How can I test for NULL properly in this case?
VBScript Language Limitations in an ASP Environment
by Jai Bardhan
Two VBScript built in features are disabled when you are using VBScript on the server with ASP. Because ASP scripts are executed on the server, the VBScript statements, InputBox and MsgBox, that ...
Formatting Date and Time Values
by William Wen
VBScript has a built in function that allows you to convert a general date (MM/DD/YY HH:MM:SS AM/PM) into numerous other formats. The other formats are long date, short date, long time, and short ...
ASP String Functions
by DevX Pro
I have a string that changes in length and has information separated by commas. For instance, it might contain something like: agfd, addc, aprev, ads, adft I need a loop that calls each group of letters individually and then stops at the end of the string. I don't know the length of the string—it changes every time.
Get Milliseconds From Time in ASP?
by DevX Pro
Can I get milliseconds from time in ASP? For example, 12:30:00.234 HH:MM:SS.fff.
Submitting a Form Without a Submit Button
by DevX Pro
How can I submit a form in ASP without a user clicking on a button? I tried: nameofform.submit() but I get the error: Microsoft VBScript runtime error '800a01a8' Object required: ''
Display Small Decimals Using VBScript
by William Wen
It is common to have online survey results posted via an ASP page. While for the most part it will work fine, you have to be careful when your results contain small irrational numbers. For small ...
Passing Collections Between ASP Pages
by DevX Pro
I am generating Active Server Pages using Visual InterDev and VBScript. I have fetched all my records from the database through my ActiveX DLL into a collection variable. Can I pass my whole collection to some other ASP so that it will minimize the trip to the server? A request.querystring doesn't work. I tried page objects and many things, but still got stuck at one point.
41-60 of 95     Previous     Next
Sitemap