我有一个中继器和它的ItemCommand代码,我需要做一个数据库检查,如果一些记录被删除,如果是的话,询问用户是否想继续。像这样的东西附加javascript确认对话框到linkButton /形式在直放站ItemCommand
If e.CommandName="Clone" Then
'Do the database check to see if records deleted and if yes
'show a confirmation dialog and if user answers "yes" continue, if "no" stop
End If
命令“克隆”来自LinkButton。另外,我想在ItemCommand而不是ItemCreated或DataBound中执行此操作,因为我不希望为每条记录添加检查。它只在我点击Linkbutton时执行
这可能吗?谢谢。
我尝试了第二种方法,但无法使对话框出现。我试过这样的东西 Dim t As Type = Me。[GetType]() Dim confirmMsg =“return confirm('你确定要继续吗?');” ScriptManager.RegisterStartupScript(Me.Page,t,“ConfirmScript”,confirmMsg,True) 如果它是一个警报但不确认 – 2012-03-29 23:43:17