This copy button functionality is working in localhost. But when deploy it into server it's not working on server side.
protected void btnCopy_Click(object sender, EventArgs e)
{
try
{
Thread myth;
myth = new Thread(new System.Threading.ThreadStart(CallSaveDialog));
myth.ApartmentState = ApartmentState.STA;
myth.Start();
lblok.Text = "URL Copied to Clipboard, Use CTRL+V to Paste";
}
catch (Exception ex)
{
Class_login abc = new Class_login();
abc.writeerrorlog(ex.Message);
}
}
void CallSaveDialog() { System.Windows.Forms.Clipboard.SetText(TxtUrl.Text); }