如何获取vb.net中浏览器中显示的消息的确认值 [英] how to get the confirm value of message shown in browser in vb.net

查看:79
本文介绍了如何获取vb.net中浏览器中显示的消息的确认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,



我在vb.net中使用以下常用功能代码来显示基于Java的删除确认确认窗口。



Hello All,

I am using the following common function code in vb.net to show a Java based confirmation window for Delete confirmation.

Public Function fnConfirmation(ByVal page, ByVal message)
        fnConfirmation = ""
        Dim sb As New System.Text.StringBuilder()
        sb.Append("return confirm('")
        sb.Append(message)
        sb.Append("');")

        page.page.ClientScript.RegisterOnSubmitStatement(page.GetType(), "alert", sb.ToString())
        Return fnConfirmation

    End Function





弹出消息并单击按钮。 但是我无法获得点击的值/按钮信息。



请指导!



谢谢



The message pops up and the buttons are clicked. But I am not able to get the value/button information of clicking.

Please guide!

Thanks

推荐答案

完成!!!



我添加了代码页面加载事件,它的工作..



btnDelete.Attributes.Add(onclick,返回确认('你真的想要删除吗?') )



谢谢Wombaticus
done!!!

I added the code in page load event and it works..

btnDelete.Attributes.Add("onclick", "return confirm('Do you really want to delete this?')")

Thanks Wombaticus


这篇关于如何获取vb.net中浏览器中显示的消息的确认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆