Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted

1 solution

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 />
        $("#<%=txtDomain.clientid %>").val(domain);<br />
        $find("<%=ModalPopupExtender1.clientid%>").hide(); <br />
     }<br />
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900