asp.net控制項+script
馬小玲大妳好!
原本的msgbox的錯誤使用http://forums.microsoft.com/msdn-cht/showpost.aspx?postid=3992657&siteid=14,想再次發問、不知為啥原因不能發送,來到這裡尋求支援、可否?
請問可以明示如何寫嗎?譬如說這段scipt要放在哪裡?abc.aspx還是 abc.aspx.vb?
位置在<head ....>中間這裡嗎</head>
像底下這樣嗎?請指教! asp.net控制項夾雜script 好像不太對勁?
<head runat="server">
<script language="vbscript" type="text/vbscript">
public Function apC()
dim cki as Integer
cki = ckTe() ..................檢查聯絡人1--5資料是否要維持 空白,相關電話、身分證號需要隨之相關
if cki > -1
appendC() .................隱藏btAppend的onClick
end if
end function
Public Function ckTe() As Integer
Dim ptel1, ptel2, ptel3, ptel4, ptel5 As String
ptel1 = ""
ckTe = 0
If Len(Me.name1.Text) = 0 Then
ptel1 = MsgBox("聯絡人1資料保持空白?", MsgBoxStyle.YesNo, "請選Yes/No")
If ptel1 = "6" Then 6 .....Yes 7.....No
ckTe = "6"
Me.TEL1.Text = "空白"
Me.idno1.text="空白"
End If
End If
If Len(Me.NAME.Text) = 0 Then
Me.NAME.BackColor = Drawing.Color.Yellow
MsgBox("姓名不可空白", , "!!嚴重錯誤訊息!!")
ckTe = -1
End If
If ckTe < 0 Then
MsgBox("黃色欄位資料錯誤,請輸入正確資料", , "資料錯誤訊息")
End If
End Function
</script>
<title>客戶基本資料</title>
</head>
<Form .....
<input type="button" name="apcd" onclick="apc" runat="server" />