Hi,
I want to copy content from popup page(popup page is aspx page.) My requirement is need add one "Button" on that popup page . When we will click on that button(COPY), All content should copy(For contents Label is used) using ASP.NET C# or Javascript.
Here is my code which is working. But there is one problem in my code. How to achieve this by clicking on Button(Copy) content should copy .
It is working now. But there is one problem i found after testing my application.
Problem is that, I have icons in each row inside gridview . If i clicked on icon, its showing as like popup(Actually its not a popup window, Added as new page). My doubt is, if first time i clicked on COPY button on any rows, its able copy content .But second time while clicking on COPY button in different rows inside gridview, its not copying other content. Its copying old content which i copied earlier.
How to fix this issue, While click on COPY button on any icon in any rows, its copy that rows content data instead of previews/first time copy data/content.
<pre><input type="button" id="btnCopy" value="Copy" onclick="window.clipboardData.setData('text', document.getElementById('ltlContentName').innerText);" />
What I have tried:
I tried above code.
<input type="button" id="btnCopy" value="Copy" onclick="window.clipboardData.setData('text', document.getElementById('ltlTemplateName').innerText);" />