Last post Apr 29, 2008 01:53 AM by Nai-Dong Jin - MSFT
Apr 27, 2008 01:00 PM|ts2527|LINK
I'm trying to create a User Control in VS 2008 and am getting the following two errors. I'm a newbie and was hoping someone could help shed light on the code?
Error 1 The name 'LinkTable1' does not exist in the current context
Error 3 The name 'gridContent' does not exist in the current context
LinkTable1.Items = items;
gridContent.DataSource = items;
Apr 27, 2008 03:30 PM|albertpascual|LINK
Can you post the code of the usercontrol html? that message normally tell us that there is something wrong with the defenition of the control.
Apr 28, 2008 11:34 AM|ts2527|LINK
Sure thing. The html code for the control is:
Apr 29, 2008 01:53 AM|Nai-Dong Jin - MSFT|LINK
Based on your code and the error message, it indicates that the application failed to find the object instance which named as LinkTable1 and gridContent.
From the html code you provided, I still can’t find the controls with the ID mentioned above. So please make sure that the ID you are using in the code behind matches
the control on the source mode page.