弹出控件 [英] pop up having controls
本文介绍了弹出控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
i有一个页面上有两个控件:
文本框和下拉列表将在那里。并且会有一个提交按钮。提交按钮的clcik我显示弹出窗口。弹出窗口包含一个按钮。我将关闭弹出窗口的clcik。鳕鱼eis:
Hi
i had a page on which two controls:
textbox and dropdown will be there.and there willl be a submit button.on clcik of submit button i am displaying pop up.the pop up contains one button.on clcik of that i will close the pop up.the cod eis :
<asp:Button ID="btnClose" OnClientClick="self.closepopup(); return false" Text="Close"
现在我的要求是同时我要重置控件。所以我可以为同一个按钮编写服务器端事件并重置控件,然后单击
now my requirement is at the same time i nned to reset the controls .so can i write a server side event for the same butto and reset the controls in that click
推荐答案
是的,只是添加OnClick =SomeServerSideEvent
。
在代码中定义事件并执行任何操作。
Yes, just addOnClick="SomeServerSideEvent"
.
Define the event in code behind and do whatever you want.
protected void SomeServerSideEvent(Object sender, EventArgs e)
{
// Do whatever you want to do.
}
在代码段下方,
below the code snippet ,
Button_Click()
{
Response.Write("<script>window.close();</script>");
Response.End();
//reset the necessary controls
}
它应该有效。它对我有用。
如果你遇到任何问题,请回复...
It should work. It works for me.
Plz reply back if u got any problem...
这篇关于弹出控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文