开发者

Open window with generated HTML content in ASP.NET?

开发者 https://www.devze.com 2023-03-26 09:04 出处:网络
Is there any possible way of populating a popup window with dynamically created HTML? Right now, I have this:

Is there any possible way of populating a popup window with dynamically created HTML?

Right now, I have this:

HttpContext.Current.Response.Clear();
HttpContext.Current.Response.Write(writer.ToString());
HttpContext.Current.Response.Write("<script>window.print();</script>");
HttpContex开发者_如何转开发t.Current.Response.End();

But it is very unattractive to have the contents be displayed in the original window. I know that I could create a seperate file where I can assemble the query with querystrings and have that pop out, but is there any easier way of doing this?

Many thanks


Write a javascript function that receives HTML as a parameter, opens a new window and populates it with the new HTML. This is not a .NET issue, it's all client-side.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号