இவற்றிற்கான களஞ்சியம் 'ASP/ ASP.NET' வகை

Sep 18 2006


CAPitalZ

Detect users leaving your web page

leaving.asp

The above file has the necessary coding to detect a user leaving your web page. Just rename the file to “leaving.asp”.

_____
CAPital

No responses yet

Sep 08 2006


CAPitalZ

Switching language in web user interface pages

language.asp

Use the above file to switch between two languages of your web user interface. Ex English and French.

All your webpages has to be named

<somename>_e.asp

<somename>_f.asp

ex. aboutMe_e.asp, index_f.asp

While the user is on one page [aboutMe_e.asp], s/he can click on the menu option “language” and it will automatically switch to the other language [aboutMe_f.asp]. Therefore, you don’t have to worry about linking the other language files, since this “language” option on the menu would automatically display the correct file.

Note: Please rename the file to “language.asp”

_____
CAPital

No responses yet

Jul 06 2006


CAPitalZ

[VB] Improvements

Avoid multiple Response.Write statements and group them in to few. Slower:

‘Add a default Select Word
Response.Write ” <option value=”"0″”>(Select a Program Manager)</option>”

¨       Do While Not objRs.EOF
Response.Write ” <option value=” & objRs!ProjManKey & “>” & objRs!ProjMan & “</option>”
objRs.MoveNext
Loop
Response.Write “</font> </select>”

Faster:

Dim strHTML

‘Add a default Select Word
strHTML =  ” <option value=”"0″”>(Select a Program Manager)</option>”

Do While Not objRs.EOF
strHTML = strHTML & ” <option value=” & objRs!ProjManKey & “>” & objRs!ProjMan & “</option>”
objRs.MoveNext
Loop
strHTML = strHTML &  “</font> </select>”

Response.Write strHTML

______
CAPital

No responses yet

Jul 06 2006


CAPitalZ

ASP.NET [VB] bugs

<script language=”VBScript” runat=”server”>

above seems to be executing at server AFTER the page is loaded.  So loading data before a page is loaded is not working..

<% %> this inline script seems t be loading BEFORE a page is loaded in a web browser.

_____
CAPital

No responses yet

Jun 28 2006


CAPitalZ

ASP [VB] bugs

If <%inline script%> used[Server.CreateObject], the connection object is created right away, while if <object> tag is inserted

<%…%>
<object ….
<%…%>
works, the object created by the <object> tag doesn’t get created until there is a use

ex.
if the object created using <object is a recordSet, then it is never created until
recordSet.Execute.. or similar happens

=========
if the object is created using Server.CreateObject inside a SUB or FUNCTION, then that object is never created until that SUB or FUNCTION is called.

======

<script language=”VBScript” runat=”server”>
tag wouldn’t execute unless it is explicitely called, as a FUNCTION or SUB

=======

If you Request.QueryString() a non-defined variable VBS automatically creates the variable and hence
IsEmpty() -> TRUE and IsNull() -> FALSE!

=================

If you Trim(Request.QueryString()) a non-defined variable, then VBS automatically creates it. Hence
IsEmpty() -> FALSE and
IsNull() -> FALSE

========

If you Request.Form(“”) a non-defined variable, then VBS outputs
IsEmpty() -> FALSE
IsNull() -> FALSE

If Trim(Request.Form(“”)) a non-defined variable then
IsEmpty() -> FALSE
IsNull() -> FALSE

_____
CAPital

No responses yet

பழைய இடுகைகள் »