several textboxex that I have in ASP.NET Datagrid.
In ITemDataBound event I have this code:
private void grdData_ItemDataBound(object sender, DataGridItemEventArgs e)
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
TextBox txtProposta1 = (TextBox)e.Item.FindControl("txtProposta1");
TextBox txtProposta2 = (TextBox)e.Item.FindControl("txtProposta2");
TextBox txtProposta3 = (TextBox)e.Item.FindControl("txtProposta3");
TextBox txtProposta4 = (TextBox)e.Item.FindControl("txtProposta4");
TextBox txtProposta5 = (TextBox)e.Item.FindControl("txtProposta5");
TextBox txtProposta6 = (TextBox)e.Item.FindControl("txtProposta6");
TextBox txtProposta7 = (TextBox)e.Item.FindControl("txtProposta7");
// ...etc ....
txtProposta1.Attributes.Add("onpaste", "return onPaste(this)");
txtProposta2.Attributes.Add("onpaste", "return onPaste(this)");
// ...etc ....
so I have to write to this function - onpaste - that copy the values in these textboxes.
This task is row by row, not in group (so it could be more easy to write).
Anyone can help me in this task?
Thanks a lot.
As far as I have read there are restrictions placed on the interaction between JS and the browser's clipboard. As such, most methods you'll find online use a flash file so that it receives a JS command and text so that in turn it can copy it to the clipboard. Why is flash not restricted? No idea, but its not.
Just Google it and you'll find tons of alternatives:
you'll want to cut and paste in one textarea, and break it up into pieces that go in each textbox.
Create, Share, and Debug HTML pages and snippets with a cool new web app I helped create: pagedemos.com
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread