I'm working in .NET. My page is in ASP with VB code behind. I've tried several methods to get this to work.
I need to display HTML sourcecode on the fly (which is stored in a String) in a pop up window when a user clicks a ButtonField control in my GridView.
I have a panel that I am trying to popup which would be sufficient I think if I could figure out how it works:
CODE
<asp:Panel ID="pnlHTML" runat="server" Visible="false" CssClass="modalPopup" Wrap="false"
style="display:none;" BorderStyle="Solid" ScrollBars="Auto">
<asp:Literal ID="litHTML" runat="server" />
</asp:Panel>
Here is my code for the button field which is within a gridView:
CODE
<asp:ButtonField ButtonType="Button" CommandName="viewEmail" HeaderText="Email"
Text="View" />
And my code behind, I have this line within a Select statement on e.CommandName in my RowCommand subprocedure:
CODE
Case "viewEmail"
litHTML.Text = "<p>New</p><ul> <li>Jones </li></ul>"
pnlHTML.Visible = True
How can I get this to work? Or is there a better way? It seems like I have tried everything. Any help would be most appreciated.