从模式弹出窗口返回值 [英] Returning a value from a modal popup

查看:57
本文介绍了从模式弹出窗口返回值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想在asp.net中实现一个Modal Popup Extender,在弹出窗口中有一个按钮,当单击该按钮时,弹出窗口关闭并且值在父页面中显示,该怎么办,请在c#

Hi,

I want to implement a Modal Popup Extender in asp.net in pop window have a button when click on button the popup window is close and values is shown in parent page how can be done ,please provide source code in c#

推荐答案

没有为此的C#代码.您的对话框将在客户端上创建,显示和关闭,而无需与服务器端进行交互.

但是,您可以 Window.Parent [
There is no C# code for this. Your dialog is being created, displayed and closed on the client with no interaction with server-side.

You can, however, you the Window.Parent[^] property within JavaScript to update the parent window with a necessary values from the modal.


你好朋友,

当您关闭模式弹出窗口"时,然后将该值存储到要进一步使用的会话中,然后将该值设置到父页面控件中.

来自模型弹出窗口:
hello friend,

when you close the Modal Popup then store the value into session that you want for further use and after that set that value into parent page control.

from model popup :
Session["name"]=TextBox1.Text;


并设置为父页面:


and set to parent page :

TextBox2.Text= Session["name"].ToString();


希望对您有帮助.


Hope this will help you.


这篇关于从模式弹出窗口返回值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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