确认消息asp.net和c# [英] confirmation message asp.net and c#

查看:73
本文介绍了确认消息asp.net和c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好



我需要帮助确认消息是或否如果我点击是转到下一页,如果我点击否转到下一页。



提前谢谢

解决方案

编写以下代码行,它应该做你的工作



 ScriptManager.RegisterStartupScript(this,this.GetType(),alertmessage,javascript:confirm(''你想移动吗?到其他页面?''),真实); 
Response.Redirect(Nextpage.aspx);







此代码在任何案例重定向到用户点击是或否的下一页。



希望它能为您提供解决方案.....

< asp:button id =btnFinalrunat =servertext =Finalwidth =90pxonclientclick =return OnPopupWindowClose(); />





函数OnPopupWindowClose(){

if(确认(你确定要吗)关闭此页面?))

返回true;

else

返回false;

}()

Hi

I need help confirmation message yes or no If i click Yes goto next page and also if I click no go to next page.

advance thanks

解决方案

write the following line of code and it should do your work

ScriptManager.RegisterStartupScript(this, this.GetType(), "alertmessage", "javascript:confirm(''Do you want to move to other page?'')", true);
Response.Redirect("Nextpage.aspx");




This code in any case redirects to the next page wheather the user has clicked on yes or no.

hope it gives you the solution.....


<asp:button id="btnFinal" runat="server" text="Final" width="90px" onclientclick="return OnPopupWindowClose();" />


function OnPopupWindowClose() {
if (confirm("Are you sure you want to close this page?"))
return true;
else
return false;
}()


这篇关于确认消息asp.net和c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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