|
-
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;
</script>
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?
Thanks,
Alex
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks