using namespace- System.Windows.Form
protected void btn_copyadd_Click(object sender, EventArgs e)
{
string addrs="Your text here"
Val = addrs;
System.Threading.Thread staThread = new System.Threading.Thread(new System.Threading.ThreadStart(myMethod));
staThread.ApartmentState = System.Threading.ApartmentState.STA;
staThread.Start();
lbl_title.Text = "Address";
lbl_messages.Text = addrs;
ModalAlert.Show();
}
private static string _Val;
public static string Val
{
get { return _Val; }
set { _Val = value; }
}
public static void myMethod()
{
System.Windows.Forms.Clipboard.SetText(Val);
}
protected void btn_copyadd_Click(object sender, EventArgs e)
{
string addrs="Your text here"
Val = addrs;
System.Threading.Thread staThread = new System.Threading.Thread(new System.Threading.ThreadStart(myMethod));
staThread.ApartmentState = System.Threading.ApartmentState.STA;
staThread.Start();
lbl_title.Text = "Address";
lbl_messages.Text = addrs;
ModalAlert.Show();
}
private static string _Val;
public static string Val
{
get { return _Val; }
set { _Val = value; }
}
public static void myMethod()
{
System.Windows.Forms.Clipboard.SetText(Val);
}
No comments:
Post a Comment