asphaltninja
asked on
Sharepoint Web Part error: A control with the specified ID could not be found within the scope of the current naming container.
So I installed a new webpart using stsadm.exe and the webpart shows up fine when I go to add a webpart to a new page on our site. When I add the webprt however, I receive an error page stating:
"A control with the specified ID 'JoinListGridView' could not be found within the scope of the current naming container."
and I have to go to the web parts maintenance page to remove the webpart from the page. Sggestions? Thanks in advance.
"A control with the specified ID 'JoinListGridView' could not be found within the scope of the current naming container."
and I have to go to the web parts maintenance page to remove the webpart from the page. Sggestions? Thanks in advance.
ASKER
Hello,
It works in that I can actually see the web part in the web part gallery and it lets me add it to the page. I can't actually use the web part once it's on the page though. When I switch to design view in Sharepoint Designer, I see a gray box where the web part is supposed to be and it shows that error.
Also, if I try to publish the page with the web part on it I get the error page and have to go into the web part maintenance page to remove the part and be able to see my page again.
How do I go about accessing the uniqueid control? Do you mean that this is something I must set in the actual webpart tage itself?
It works in that I can actually see the web part in the web part gallery and it lets me add it to the page. I can't actually use the web part once it's on the page though. When I switch to design view in Sharepoint Designer, I see a gray box where the web part is supposed to be and it shows that error.
Also, if I try to publish the page with the web part on it I get the error page and have to go into the web part maintenance page to remove the part and be able to see my page again.
How do I go about accessing the uniqueid control? Do you mean that this is something I must set in the actual webpart tage itself?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Led me in the right direction
The issue may be because of ID used in the custom web part. when you add the webpart based on the page nested controls the id of a given control "Join..." may not be same. It could be for example: id="ctl1_ctl100_page_.....
To access the id you could use other Id methods available in the control i.e. UniqueId etc.