Unique IDs in FormView InsertItemTemplate and EditItemTemplate

H

hooterbite

The forms in Insert and Edit are almost identical, and each fom field
has the same name in each template. For example, I have a txbName in
the InsertItemTemplate and a txbName in the EditItemTemplate. My
project has been fine until today, and now it says that " The ID
'txbName' is already used by another control." I did not change
anything in my code. Anyone know why this would change, why I would
start getting this error now when the page worked fine for months?
 
Joined
May 19, 2008
Messages
1
Reaction score
0
The forms in Insert and Edit are almost identical, and each fom field has the same name in each template. For example, I have a txbName in the InsertItemTemplate and a txbName in the EditItemTemplate. My project has been fine until today, and now it says that " The ID 'txbName' is already used by another control." I did not change anything in my code. Anyone know why this would change, why I would start getting this error now when the page worked fine for months?

I had the same problem in Visual Studio 2008 (VS 2005 never seemed to do it?). The solution that fixed it for me was correcting a missing end tag on a different element (still within the ItemTemplate--not sure if that matters) on the same page. Once the syntax was correct for the whole ASPX page, this bogus error also went away.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top