I think you should typecast the control you are searching for into the desired type of control, like:
TextBox Check=DetailsView1.FindControl("attachment") as TextBox;
then you should try to either get or set its value. Like:
Check.text="Something";