本文介绍了客户端脚本块在我的页面中不起作用.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Protected Sub Delete_onGridRow_Click(ByVal sender As Object, ByVal e As EventArgs)
Try
ostate = New BLstate
str = DirectCast(sender, System.Web.UI.WebControls.ImageButton).CommandName.ToString
With ostate
.stateid = str
End With
result = state.state_delete(ostate)
If result > 0 Then
gvList.DataSource = state.Listview(txtstate.Text, ddstateStatus.SelectedValue)
gvList.DataBind()
'Page.ClientScript.RegisterClientScriptBlock(Me.GetType, "alert", "alert('item not deleted');", True)
'Page.ClientScript.RegisterStartupScript(Me.GetType, "alert", "showDialog('Warning','Item not deleted.','warning');", True)
'Response.Write("item not deleted")
ScriptManager.RegisterStartupScript(Me, Me.GetType, "alert",script, True)
End If
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
我正在使用contentpalaceholder来绑定其他页面,服务器端验证未响应(客户端脚本块),我尝试了太多代码,我的代码在这里,请给我一些解决方案.
I am using contentpalaceholder for binding another pages , server side validate is not responde( client script block ),i am tried so many codes ,my codes are here,please give me some solutions.
推荐答案
这篇关于客户端脚本块在我的页面中不起作用.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!