Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clipboard
Message
 
À
15/12/2003 06:55:59
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
00859057
Message ID:
00859103
Vues:
17
>How can I put something in Clipboard clicking a button?
>(WebForm)

From the Help:

To place data on the Clipboard

Use the SetDataObject method to send data to the Clipboard.
The following example shows how to make the Click event of a Button control send the text of a TextBox control to the Clipboard:
' Visual Basic
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
   Clipboard.SetDataObject(TextBox1.Text)
End Sub

// C#
private void button1_Click(object sender, System.EventArgs e)
{
   Clipboard.SetDataObject(textBox1.Text);
}
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform