Cannot reference checkbox in a DetailsView Edit/Insert template

I have a details view with a textbox control bound to a text field in my database.  The text field holds a 3-character code.  For user convenience, I have elected to have a checkbox represent a letter (ie: checkbox1 = "C", checkbox2 = "R", etc.)  Problem is that the checkboxes are in the edit and insert templates, so I don't know how to reference them;  they are simple unbound checkboxes  (code behind doesn't see them).  any help appreciated.
dhenderson12Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MrunalCommented:
Hi can you please share your code ?
0
Kamal KhaleefaInformation Security SpecialistCommented:
try to do a find control on that row to find your checkbox
0
Tushar ParekhIntegration Project of Major Payment Gateways into a Single Payment Gateway Switching SystemCommented:
Hello ,

You need to use the DetailsView1.FindControl() method to find the particular control and use the reference to display the valye .

Suppose you have a DetailsView whose id is DetailsView1. In that you have defined ItemTemplate , EditItemTemplate,etc.

Choose the event where you want to do an Insert , Edit or any other Operation . You can even use the DataBind event and in that you can check the control by calling FindControl Method viz. DetailsView1.FindControl(<ControlId>) and take that reference and use the reference to display , edit , delete the value in that particular HTML Element.

There are lots of solutions in many different ways where you can implement this .

Hope this helps !!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.