asp不支持三元运算符
Reference :
asp三元运算符怎么用_百度知道
2013年4月22日 星期一
asp switch case
Dim myNum
myNum = 5
Select Case myNum
Case 2
Response.Write("myNum is Two")
Case 3
Response.Write("myNum is Three")
Case 5
Response.Write("myNum is Five")
Case Else
Response.Write("myNum is " & myNum)
End Select
Reference :
ASP Tutorial - Select
2013年1月21日 星期一
ASP chekc if POST
if Request.ServerVariables("REQUEST_METHOD") = "POST" then Response.Write "post data ..."end if
Reference :
Server Variables (Windows)
ASP conn.Execute(SQL) INSERT return auto_increment id
SQL = "INSERT INTO table (a, b, c, d) VALUES ('a', 'b', 'c', 'd')"
conn.Execute(SQL)
Set rsAdd = conn.Execute("SELECT @@IDENTITY")
idnum = rsAdd(0)
Set rsAdd = Nothing
conn.Close
Response.Write "Insert success :" & idnum
Reference :
SELECT LAST_INSERT_ID() in ExecuteScalar() returns 0 only : The Official Microsoft ASP.NET Forums
2013年1月20日 星期日
2013年1月14日 星期一
ASP Date Time
Response.Write FormatDateTime(Now(), 0)
或
Response.Write FormatDateTime(Now(), vbLongDate)
1 vbLongDate 長日期格式
2 vbShortDate
3 vbLongTime
4 vbShortTime 短時間格式
或
Response.Write FormatDateTime(Now(), vbLongDate)
1 vbLongDate 長日期格式
2 vbShortDate
3 vbLongTime
4 vbShortTime 短時間格式
訂閱:
文章 (Atom)