Is there any way to working with Clipboard
in ASP.NET
, in Server-side
?
I want to push something in Clipboard
& fetch it.
EXTRA INFO:
I had some search and found out, the solution is working with Thread
. but I'm looking for another way, if is there another way.
UPDATE: Please answer to following questions:
- Can I work with thread when I'm working with clipboard?
- If so, can I run new thread when I'm working with clipboard more than one time withing single process (imaging user clicked on a button and I have to push 100 data in clipboard withing a for (loop))
For example:
Option 1:
void myMethod(object i){
// put something on clipboard and get that
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
for(int i=0; i<100; i++){
Thread t = new Thread(myMethod);
t.Start(i);
}
}
Option 2:
void myMethod(){
for(int i=0; i<100; i++){
// put something on clipboard and get that
}
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
Thread t = new Thread(myMethod);
t.Start();
}
Which one is correct?
This is how you do it:
For each button click, just call
PdfToJpg()
and you are done.