Hi
I have these Sub (vbscript) in ASP, now I am converting them to ASP.Net, but have no idea how to go about it:
Sub Window_OnLoad()
Clear_Form(0)
End Sub
Sub Clear_Form(status)
if(status <> 0) then
confirmClear=MsgBox ("Are you sure you want to clear form?", 36,"Confirm Clear Form")
else confirmClear=6
end if
if(confirmClear = 6) then
document.form_choice.txtEmpId.value = ""
document.form_choice.optShift.value = ""
document.form_choice.cmdSubmit.disabled = True
document.form_choice.txtOthers1.value = ""
document.form_choice.txtOthers2.value = ""
'Add by CHLEE at 25 Oct 2007
document.form_choice.txtRemeasured.value = ""
document.form_choice.txtResampling.value = ""
If intRCFound = 1 Then
'Root Cause
for i = 1 to actionCount
document.form_choice.A&i.checked = false
next
'Root Cause TextBox Remark Clear, Add by CHLEE at 1 Nov 2007
for i = 1 to actionCount
document.form_choice.txtARemark & radioRCArray(i-1) & .value = ""
next
End If
If intCAFound = 1 Then
'CA TextBox Remark Clear, Add by CHLEE at 1 Nov 2007
for i = 1 to actionCount2
document.form_choice.txtBRemark & radioCAArray(i-1).value = ""
next
'CA
for i = 1 to actionCount2
document.form_choice.B & i .checked = false
next
End If
'Add by CHLEE at 25 Oct 2007
document.form_choice.B_1.checked = false
document.form_choice.B_2.checked = false
document.form_choice.A0.checked = false
document.form_choice.B0.checked = false
document.form_choice.txtEmpId.focus()
end if
end sub
I tried to place the code in .aspx page, but hit with unknown error, then I put it in .aspx.vb, but the "document" element is not recognized.
Please help.