tracer tong
tracer tong

Reputation: 553

c#.net id duplicate reported untruthfully

I am getting an error in visual studio that appears to be flat out wrong. Here it is:

The tag contains duplicate 'ID' attributes.

on the following line:

Rica.Yoodul.MiniSites.BaseMiniSiteUserControl ucMaster = (Rica.Yoodul.MiniSites.BaseMiniSiteUserControl)Page.LoadControl("~/MiniSites/" + templateName + "/Master.ascx"); 

I have checked though both the master and child pages for repeats of the id I last added (the only one added since last successful test) and the ID is used once across both files. Other than controls (e.g ), is there anything this error refers to? Or is there a workaround? I have checked I am editing the right files.

On the face of it this appears to be a visual studio bug, but I want to be sure.

Upvotes: 0

Views: 117

Answers (1)

Rawling
Rawling

Reputation: 50174

This doesn't mean the same ID is used in different controls; it means there's a control, probably in that .ascx file, with two ID attributes in it.

Upvotes: 3

Related Questions