'----------------------------------------------------------------------------------
' 제목 : HTML에서 <select></select>에 사용하기 위한 함수
' 요약 : DB에서 조회한 데이터에 대하여 매핑되는 <option>에 selected 속성을 부여하기 위해 사용되는 함수이다.
' 사용예 : <option < % =selected(DB에서조회한값, '비교할값') % >></option>
'----------------------------------------------------------------------------------
Public Function selected(in_value, compare_value)
If in_value = compare_value Then
selected = "selected='selected'"
Else
selected = ""
End If
End Function
'ASP' 카테고리의 다른 글
ASP Redirect 사용하기 (0) | 2014.07.30 |
---|---|
널값체크 isnull() (0) | 2014.07.30 |
ASP 날짜 관련 사용자 정의 함수 (펌) (0) | 2013.09.23 |