0

I created a C# desktop application to generate XML File and save XML file to Clipboard, now I need to read Clipboard using Asp.Net Core 3.0.1, How can I read Clipboard data using Asp.Net Core 3.0.1?


This is the code that i used to generate XML and copy XML data to the Clipboard

var serializer = new XmlSerializer(typeof(CardData));
FileStream fs;

fs = File.Create(FilePath);
serializer.Serialize(fs, cardData);
fs.Close();

var Data = File.ReadAllText(FilePath);
Clipboard.SetText(Data);

And this is some resources I search:
1. https://www.codeproject.com/Articles/1265249/Read-Emirates-ID-in-a-Web-Application
2. .Net Core - copy to clipboard?
3. https://code-examples.net/en/q/2a284cc

ali
  • 175
  • 1
  • 4
  • 21
  • 2
    There is no clipboard access in ASP.NET Core, because it runs on the server, whereas the clipboard is a client-side concept. You can access the clipboard via JavaScript and then use AJAX or something to send that to the server. – Chris Pratt Oct 21 '19 at 16:57
  • Thanks @ChrisPratt, This help me to do the solution – ali Nov 24 '19 at 04:05

0 Answers0