ASP.NET School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a ASP.NET Expert!

Join 307,222 ASP.NET Programmers for FREE! Get instant access to thousands of ASP.NET experts, tutorials, code snippets, and more! There are 1,669 people online right now. Registration is fast and FREE... Join Now!




How to generate HTML in a Pop Up window

 

How to generate HTML in a Pop Up window, is it possible?

pepsidime

9 Oct, 2008 - 11:12 AM
Post #1

New D.I.C Head
*

Joined: 8 Oct, 2008
Posts: 4



Thanked: 1 times
My Contributions
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.



User is offlineProfile CardPM
+Quote Post


Posts in this topic

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 10:43PM

Live ASP.NET Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

ASP.NET Tutorials

Reference Sheets

ASP.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month