title: Html popup window from code behind file
body: <p>This could be a simple but I havent found any easy solution.</p>
  
  <p>On clicking button in asp.net web page on button click event html is generated from xml and xsl. This html is stored as string variable. For example lets say </p>
  
  <pre><code>dim htmlString as string = "&lt;div&gt;This is my popup&lt;/div&gt;"
  </code></pre>
  
  <p>From the above html string how can I dynamically create html popup window in vb.net. I can create popup window on front end by using javascript but havent found any solution to create it through code behind file in vb.net</p>
  
  <p>Edit:</p>
  
  <p>This does not work in IE, only works in firefox:</p>
  
  <pre><code>Dim popupScript As String = _
     "&lt;script language='javascript'&gt; myPopup() &lt;/script&gt;" 
  Dim mystring = "&lt;html&gt;&lt;body&gt;&lt;div style=""color:black""&gt;Name: Jame's&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;" 
  Page.ClientScript.RegisterStartupScript(Me.GetType(), "PopupScript", String.Format(popupScript)) 
  </code></pre>