使用C#在ASP.NET中创建弹出窗口 [英] Create Pop-Window in ASP.NET using C#
本文介绍了使用C#在ASP.NET中创建弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在ASP.Net中创建对话框对话框,例如:如果单击一个POP窗口,则显示消息.(成功登录")
how to create a dilogue box in ASP.Net, EX:If i click a button One POP Window Show the message.("Successfully Login")
推荐答案
从Code Project尝试这篇文章
自定义对话框控件 [
Try this article from Code Project
A Custom Dialog Box Control[^]
@Kumrvits
首先,您的问题还不清楚,
你想做什么?
有三种方法.如果成功登录
1)显示一个javascript警报对话框.
2)显示一个弹出窗口,也可以通过javascript完成.
3)使用下面的代码,您可以显示一个对话框
@Kumrvits
First of all your question is a bit unclear,
What do you want to do?
There are Three ways. if successfully logins
1) show an alert dialog box of javascript.
2) Show a popup window which can also be done through javascript.
3) using the below code you can show a dialog
Response.Write("<script type=''text/javascript''>alert(''Sucessfully login'')</script>");
Response.Flush();
C#还提供了注册客户端脚本的功能.
Page.ClientScript.RegisterStartupScript()
为此,下面的链接将为您提供帮助.
DevCurry.com
希望您得到了答案
C# also provides to register client side script.
Page.ClientScript.RegisterStartupScript()
For this the below link will help you.
DevCurry.com
Hope you have got the answer
只是一个警告语.弹出窗口令人讨厌,尤其令人讨厌,因为它们与不需要的添加关联.许多用户选择使用其Web浏览器功能/插件来阻止弹出窗口.
您可以开发一些替代的消息表示形式.它可以基于通常不可见的某些HTML元素(通常为div
),因此您可以通过事件控制可见性.
—SA
Just a word of warning for you. Pop-ups are irritating, and especially irritating because they are associated with unwanted add. Many users choose to block pop-ups using their Web browser features/plug-ins.
You can develop some alternative presentation for messages. It can be based on some HTML element (typicallydiv
) which is normally invisible, so you can control visibility by your events.
—SA
这篇关于使用C#在ASP.NET中创建弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文