如何在girdview中使用ajax确认 [英] how to use ajax confirmation in girdview
问题描述
我如何在gridview中使用ajax确认?
我有一个带有删除图像按钮的gridview,它从sql数据库中删除记录//我想在删除记录之前先询问像确认消息不是ajax的javascript吗?
如何在gridview中使用AJAX确认?
我有一个带有删除图像按钮的gridview,它使用AJAX从sql数据库中删除记录.
我想先删除记录后再确认.
how can i use ajax confirmation with gridview??
I have a gridview with delete image button its delete the record from sql database //I want to ask first before delete the record Like confirmation message not javascript by ajax ???
How can I use AJAX confirmation with gridview?
I have a gridview with a delete image button it deletes the record from an sql database using AJAX.
I want to ask confirmation first before the record is deleted.
推荐答案
我不知道为什么要使用AJAX而不是Java确认消息.
AJAX也可以在内部通过javascript使用XMLHttpRequest进行工作.使用Scriptmanager/更新面板并具有如此多的请求和响应有什么意义?
您可以将onclick事件与数据网格ItemdataBound事件中的图像按钮相关联,并进行确认!
I wonder why you want to use AJAX and not Javascript confirm message.
AJAX will also work using XMLHttpRequest via javascript internally. Whats the point of using Scriptmanager/update panels and having so many requests and response?
You can associate onclick event to image button in your datagrid ItemdataBound event and you done with confirmation!
在删除图像按钮"标签中添加类似以下内容的标签(适用于"LinkButton" ):
Add something like the following to the "delete image button" tag (which works for a "LinkButton"):
OnClientClick="return confirm(''Are you certain you want to delete this product?'');"
来源- http://www.asp.net /%28S%28pdfrohu0ajmwt445fanvj2r3%29%29/learn/data-access/tutorial-22-vb.aspx [
Source - http://www.asp.net/%28S%28pdfrohu0ajmwt445fanvj2r3%29%29/learn/data-access/tutorial-22-vb.aspx[^]
这篇关于如何在girdview中使用ajax确认的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!