J
Jon Prisbe
I have a user requirement to add the ability to copy selected rows from a
listbox on an ASP.NET page to the clipboard. I am iterating through the
selected rows and building a string to copy to the clipboard. If I try to add
a CRLF after each item (so the rows can later be pasted into a multi-line
text box) the copy to clipboard fails. I can add tab characters, commas, etc.
How do I add multiples CRLF ended lines of text to the clipboard?
My code:
string script = "<SCRIPT language=javascript> ";
script += "window.clipboardData.setData(\"Text\",\"";
script += MyCRLFDelimitedString + "\"); </script>";
System.Web.HttpContext.Current.Response.Write(script);
Thanks,
Jon
listbox on an ASP.NET page to the clipboard. I am iterating through the
selected rows and building a string to copy to the clipboard. If I try to add
a CRLF after each item (so the rows can later be pasted into a multi-line
text box) the copy to clipboard fails. I can add tab characters, commas, etc.
How do I add multiples CRLF ended lines of text to the clipboard?
My code:
string script = "<SCRIPT language=javascript> ";
script += "window.clipboardData.setData(\"Text\",\"";
script += MyCRLFDelimitedString + "\"); </script>";
System.Web.HttpContext.Current.Response.Write(script);
Thanks,
Jon