So I am currently working in ASP.Net and a bit stuck.

I obtain the full html that I wish to render into the tab from a WSDL request and then need to find a way to load a new tab in the browser and display that information.

I have currently only found

string script = " <script type=\"text/javascript\">  window.open('http://www.codeproject.com/Questions/532873/Howplustopluscodeplustoplusopenplusnewplustabplusi');   </script> ";
            //  this.Page.ClientScript.RegisterStartupScript(typeof(Page), "alert", script);
            ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", script, false);

On the web however this loads a pre-defined page and not HTML I wish to define. Is there a way to do this?

Recommended Answers

All 4 Replies

Can you explain what you mean by pre-defined page?

window.open(weburlhere)

I won't have a web url to open, simply raw html that I wish to view.

Hmm. Ok. I see. How about something like this? I'm not by a PC to do some testing. I generally display content that I've consumed from a web service in a modal window on the same page or some other element but I don't believe I've tried it exactly this way in a separate window/tab. You may encounter issues with pop up blockers though using this approach.

 var w = window.open();
 var data = rawHTML
 w.document.write(data);

Thanks, I will look into this more on Monday :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.