Author: Mainship | Posted on: 10/22/2008 8:11:48 PM | Views : 229

I have a text box already populated with text, and a button.  I want the button click to copy the contents of the text box to the client's clipboard.  I did a Google search and came up with two possible methods, but I can't get either to work.  Maybe I'm not incorporating the javascript correctly?   I have a master page and the textboxes are on a content page.  In the header of the Master page I have
<asp:ContentPlaceHolder ID="CPHStyles" runat="server">
</asp:ContentPlaceHolder>
The first thing I tried was to add this javascript:
<asp:Content ID="ContentStyle" ContentPlaceHolderID="CPHStyles" runat="server">
    <script type="text/javascript">
        function CopyToClipboard() {
            document.Form1.tx ...

Go to the complete details ...