单击超链接时打开模型弹出窗口 [英] Opening model popup on hyperlink's click

查看:75
本文介绍了单击超链接时打开模型弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的代码项目成员

我想在HyperLink的单击上打开Ajax Model PopUp.我的HyperLink位于MasterPage上,而PopUp位于常规页面上.请帮助我实现这一目标.

Dear Code Project Members

I want to open Ajax Model PopUp on HyperLink''s click. My HyperLink is on MasterPage & PopUp is on normal page. Please help me to achieve this.

推荐答案

我认为您还没有听说过Google搜索引擎

在代码背后的Hyperlink1_Click事件中,使用此代码
I think you have not heard of Google Search engine

In the Hyperlink1_Click event in code-behind use this code
ModalPopupExtender1.TargetControlID=(this.MasterPage.FindControl("Hyperlink1") as HyperLink).ID;
ModalPopupExtender1.Show();



http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx [a> [ ^ ]

http://www.dotnetcurry.com/ShowArticle.aspx?ID=285 [ ^ ]

ASP.NET AJAX控件工具包ModalPopupExtender控件的作用 [ ^ ]

http://csharpdotnetfreak.blogspot.com/2011/03/ajax-modalpopupextender-example- aspnet.html [ ^ ]

为您提供的其他信息是,可以使用Button,ImageButton或Hyperlink和其他类似的控件打开ModalPopup..



http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx[^]

http://www.dotnetcurry.com/ShowArticle.aspx?ID=285[^]

ASP.NET AJAX Control Toolkit ModalPopupExtender Control in Action[^]

http://csharpdotnetfreak.blogspot.com/2011/03/ajax-modalpopupextender-example-aspnet.html[^]

The additional information for you is that ModalPopup can be opened with Button, ImageButton or Hyperlink and other similar controls..


请尝试以下操作:
Try this:
ModalPopupExtender ModalPopupExtender1 = new ModalPopupExtender();
ModalPopupExtender1.TargetControlID = Hyperlink1.ClientID; 
// Here you can set directly ID also.
//Now show your Model Popup.
ModalPopupExtender1.Show();




--Amit




--Amit


这篇关于单击超链接时打开模型弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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