ajaxpopupextender-从文本框中获取价值并显示 [英] ajaxpopupextender - get value from textbox and display

查看:105
本文介绍了ajaxpopupextender-从文本框中获取价值并显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在代码中使用了AjaxPopupExtender.

要求是:在文本框中输入html代码,然后单击旁边的预览按钮,它应显示弹出窗口,在其中将读取文本框的文本内容并将其呈现为html.

在弹出面板中,我将文本值读取为<%= textHTML.Text%> ;,但会引发异常.

如何在弹出面板中读取值并将其呈现为html?

谢谢

Vijay

Hi,

I am utilizing the AjaxPopupExtender in my code.

The requirement is : enter html code in the textbox and click a preview button just beside it, it should display the popup in which it will read the text content of the textbox and render it as html .

In my popup panel, i read the text value as <%=textHTML.Text%>, but it throws exception.

How should I read the value in popup panel and render it as html?

Thanks

Vijay

推荐答案

您可以使用两个javascript函数.
弹出式窗口中的一个:

You can use two javascript''s functions.
One in your popup:

function MyPopFunction(user,domain){<br />
           self.parent.DoSomething(user,domain);<br />
  }<br />



添加到您的提交按钮:



Add to your submit button :

OnClientClick="javascript:MyPopFunction();<br />


在您的页面中:


And in your page:

function DoSomething(user,domain)<br />
     {<br />
<br />


(#<%= txtUser.clientid%>").val(user);< br/>
("#<%=txtUser.clientid %>").val(user);<br />


(#<%= txtDomain.clientid%>").val(domain);< br/>
("#<%=txtDomain.clientid %>").val(domain);<br />


这篇关于ajaxpopupextender-从文本框中获取价值并显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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