-1
Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click
Dim ResourceObject As Object
Dim js As [String] = (vbCr & vbLf & " if(confirm('Esta Seguro de eliminar de la lista')==true)" & vbCr & vbLf & " document.getElementById('" & txtRespuesta.ClientID & "').value='true';" & vbCr & vbLf & " else" & vbCr & vbLf & " document.getElementById('") + txtRespuesta.ClientID & "').value='false';" & vbCr & vbLf & " "
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "Key", js, True)
If txtRespuesta.Text = False Then
-Action 1
Else
-Action 2
End If
End Sub
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<tr >
<td align="center" colspan="2">
<asp:TextBox ID="txtRespuesta" runat="server" Width="174px" Height="21px"
MaxLength="20" style="font-weight: 700" Font-Names="Verdana" TabIndex="2"></asp:TextBox>
</td>
</tr>
<asp:Button ID="btnUpdate" runat="server" Height="28px"
style="font-weight: 700" Text="変更" Width="68px" TabIndex="3" />
<asp:Button ID="btnDelete" runat="server"
</script>
</ContentTemplate>
</asp:UpdatePanel>
調用JS背後不工作調用的JavaScript代碼,從後面確認沒有從代碼工作
謝謝。任何其他解決方法來完成此事。 – rockrule
即時通訊使用ajax確認按鈕擴展器。這解決了我的問題。感謝您的寶貴意見。 – rockrule