在.NET中确认框 [英] Confirm box in .NET

查看:70
本文介绍了在.NET中确认框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在网上搜索了一个如何在.NET中使用javascript确认框的示例。


有没有办法做到这一点?


谢谢。

I have scoured the web looking for an example of how to do a javascript confirm box in .NET.

Is there any way to do it?

Thanks.

推荐答案

嗨Mike,


关于这个问题,我们可以在客户端调用window.confirm方法

脚本。例如:


if(window.confirm("你确定要将数据发回到

服务器吗?))< br $>
{

}

其他

{

}


这是否回答了你的问题?


卢克

微软在线支持


安全! www.microsoft.com/security

(此帖子按原样提供,不作任何保证,并且不授予

权利。)

Hi Mike,

Regarding the issue, we can call window.confirm method in client side
script. For example:

if(window.confirm("Are you sure that you want to post data back to the
Server?"))
{
}
else
{
}

Does this answer your question?

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


感谢您的回答,但是我该怎么做?


这是一个javascript交易还是活在我的代码页面后面?


如何处理在我的代码页面后面这个?


您是否有可能为我提供代码片段?基本上我有一个删除按钮,我在页面后面的

代码中捕获点击,我希望用户确认。


谢谢。


" [MSFT]" <卢****** @ online.microsoft.com>在留言新闻中写道:Bz ************* @ cpmsftngxa10.phx.gbl ...
Thanks for the answer, but how do I do it?

Is this a javascript deal or does it live in my code behind page?

How do I deal with this in my code behind page?

Would it be possible for you to put up a code snippet for me? Basically I have a delete button and I am trapping the click in the
code behind page, and I want the user to confirm.

Thanks.

"[MSFT]" <lu******@online.microsoft.com> wrote in message news:Bz*************@cpmsftngxa10.phx.gbl...
嗨Mike,

关于这个问题,我们可以在客户端
脚本中调用window.confirm方法。例如:

if(window.confirm(你确定要将数据发回到服务器吗?))
{
}




这会回答你的问题吗?

卢克
微软在线支持

获得安全! www.microsoft.com/security
(此帖已提供按原样,没有任何保证,也没有授予
权利。)
Hi Mike,

Regarding the issue, we can call window.confirm method in client side
script. For example:

if(window.confirm("Are you sure that you want to post data back to the
Server?"))
{
}
else
{
}

Does this answer your question?

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



为了在ASP.NET中显示消息框,你需要使用客户端脚本

。您可以使用registerstartupscript或registerclientscript方法来

在您的表单中注册您的客户端脚本。在客户端脚本中,您可以使用

window.confirm来显示带有ok / cancel按钮的消息框。在ASP.NET中显示消息框

的另一个选项是,通过使用免费的消息框控件,可以在以下位置下载并使用它。

。查看

这个网址了解更多细节。

www.extremeexperts.com



http://www.microsoft.com/india/msdn/articles/119.aspx


-

Saravana

Microsoft MVP - ASP.NET
www.extremeexperts.com


" Mike Malter" < MI ******** @ nospam.com>在消息中写道

新闻:es ************* @ TK2MSFTNGP10.phx.gbl ...
For showing message box in ASP.NET, you need to use client side scripts
only. You can use registerstartupscript or registerclientscript method to
register your client scripts in your form. In the client script you can use
window.confirm to show message box with ok/cancel button. Another option for
showing message box in ASP.NET is, by using free messagebox control which is
available at following location which you can download and use it. Check out
this url''s for more details.

www.extremeexperts.com

or
http://www.microsoft.com/india/msdn/articles/119.aspx

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Mike Malter" <mi********@nospam.com> wrote in message
news:es*************@TK2MSFTNGP10.phx.gbl...
我已经在网上搜索过了有关如何在.NET中执行javascript
确认框的示例。
有没有办法做到这一点?

谢谢。
I have scoured the web looking for an example of how to do a javascript confirm box in .NET.
Is there any way to do it?

Thanks.



这篇关于在.NET中确认框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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