TextBox Protection Level
I have a webcontrol mycontrol.ascx that has the following textbox:
<asp:TextBox ID="Name" runat="server" Columns="15" />
When I try to access this value from the aspx page that uses the control, I get the following error:
Compiler Error Message: CS0122: 'ASP.Organization_Form_ascx.Name' is inaccessible due to its protection level
However I cannot seem to change the protection level of the textbox within the control. When I add this code:
<script language="c#" runat="server">
public TextBox Name;
I then get this error:
Compiler Error Message: CS0102: The class 'ASP.Organization_Form_ascx' already contains a definition for 'Name'
How do I go about changing the protection level of my TextBox so that I can access it in the aspx page that loads the control?
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center