本文介绍了JS确认Ok&在gridview页面索引上取消的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有一个gridview,在页面索引上我需要显示一个确认框警告,其中包含确定和取消。我在页面中有一个更新按钮,gridview有下拉值。当用户更改gridview中的下拉值并尝试移动到下一页而不单击更新按钮时,我需要显示一个警告,例如确保在导航之前更新了更改。我已经尝试了很多JS并没有任何帮助。 我在页面索引中使用了这段代码。弹出警报,但没有确认框,显示确定和取消。 string script = alert('确保在导航前更新了页面!') ; ScriptManager.RegisterStartupScript(Page,Page.GetType(), Alert,脚本, true ); 真的很感激任何帮助。解决方案 Hi,I have a gridview and on Page Indexing I need to show an confirm box alert with Ok and Cancel. I have an update button in the page and gridview has dropdown values. When user changes the dropdown values in gridview and try to move to next page without clicking update button, then I need to show an alert like "Make sure you have updated the changes before navigation". I have tried lot of JS and nothing helped.I am using this peice of code in my page indexing. The alert pops up but not the confirm box with Ok and Cancel. string script = "alert('Make sure you have updated the page before navigation!')"; ScriptManager.RegisterStartupScript(Page, Page.GetType(), "Alert", script, true);Really appreciate any help on this. 解决方案 这篇关于JS确认Ok&在gridview页面索引上取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
11-02 21:43