multivew控制項可以顯示多個檢視控制項,使用時把多個view控制項放入multiview控制項中,然後通過multiview控制項來選擇把什麼樣的控制項呈現給使用者
calendar控制項可以顯示日期,並且可以自定義顯示,**如下
partial class democelander
inherits system.web.ui.page
private holidays(12, 31) as string
protected sub dropdownlist1_selectedindexchanged(byval sender as object, byval e as system.eventargs) handles dropdownlist1.selectedindexchanged
select case me.dropdownlist1.selectedvalue
case "week"
me.calendar1.selectionmode = calendarselectionmode.dayweek
case "day"
me.calendar1.selectionmode = calendarselectionmode.day
case "dayweekmonth"
me.calendar1.selectionmode = calendarselectionmode.dayweekmonth
case "none"
me.calendar1.selectionmode = calendarselectionmode.none
end select
end sub
protected sub page_load(byval sender as object, byval e as system.eventargs) handles me.load
holidays(3, 15) = "七夕情人節"
end sub
protected sub calendar1_dayrender(byval sender as object, byval e as system.web.ui.webcontrols.dayrendereventargs) handles calendar1.dayrender
dim d as calendarday
dim c as tablecell
d = e.day
c = e.cell
if d.isothermonth then
c.controls.clear()
else
trydim hol as string = holidays(d.date.month, d.date.day)
if hol <> "" then
c.controls.add(new literalcontrol("
" + hol))
end if
catch exc as exception
response.write(exc.tostring())
end try
end if
end sub
end class
asp學習筆記
vbscript 定義變數時候不能直接賦值,如 dim i 1 是錯誤的,應該這樣 dim i i 1 結束程式 response.end 跳出迴圈或者函式 子程式等用exit 變數名大小寫模糊。response.write 中要輸出雙引號只要使用兩個雙引號 1response.write demo...
ASP 學習筆記 4
asp 學習筆記 4 伺服器應用類似,最後需要乙個cab檔案,用實用工具cabarc.exe生成,如 manifest檔案是osd open software description 格式,名為myweb.osd,乙個例子 安全模組 iis處理模組 處理瀏覽器相容資訊的設定 2 獲取配置資訊 可以用...
asp程式設計 筆記
vbscript書冊 option explicit 強制要求顯式宣告指令碼中的所有變數。conn.asp 連線 開啟 資料集的定義 sql select from djcat set rs server.createobject adodb.recordset 也可以使用set rs conn.e...