Monday, August 27, 2007

Pass info from page to another in ASP

in the main (Sender) page:
Example of if you click a LINK, it will jump to page2.asp with some info(name=ali-asp)

---- the code:
under the asp tag or in normal html:
open a (<) tag

write: a href="page2.asp?namr=ali-asp"
then close the tag (>)

then open the same tag (<) write : a then clise the tag (>)
All red to be in one line

in the other page: page2.asp

dim myvar
myvar=request.querystring("name")


or

response.write(request.querystring("name"))

Tuesday, April 10, 2007

HTML page auto refresh

1. open a tag ( < )
2. write: meta http-equiv="
3. the write: refresh" content="5;
4. then write: URL=http://www.davesite.com
5. close the tag by ( / " > )

All the RED color to e on one line..

Done..

content="5" the time before refresh
URL is the target web page

Include a file

1. Start the comment tag. (< ! -- )
2. press "shift & 3", then write: include file="file name"
3. close the comment tag ( -- > )


Thursday, April 5, 2007

Color the cell on hand over

ASP code:

Post the script in the TR or TD tages:

tr onmousemove="style.backgroundColor='#EED7AE';" onmouseout="style.backgroundColor='';"

Email validation

DIM strEmailstrEmail = Request.Form("Email")
IF strEmail <> "" AND strSubject <> "" AND strComments <> "" THEN
' your code if the format is right
'Process the form as you like here

ELSE
Response.Write "wrong email foemat, go back and correnct... (your message): "
end if