Cant get user control collection property to show up in designer


 I'm trying to create an ASP.NET user control that will expose a collection of objects as a property. As a proof of concept, I'm simply trying to implement a test control that contains an array of strings, and I'm attempting to enable design-time editing of the property. No matter what I seem to do, my test property doesn't show up in the designer window. Below is a code snippet...


/* using directives omitted for brevity */

public partial class Controls_TabView : System.Web.UI.UserControl
private string[] strings_ = new string[20];

protected void Page_Load(object sender, EventArgs e)


Description("testing 456"),
public string[] Strings
get{return strings_;}

 I'm trying to boil the idea down to it's simplest form; my eventual solution will use a generic container (i.e. List<>) to host the collection, but I can't even get it to work for this basic design.

 Thanks for any assistance you can lend!


7/8/2008 7:25:50 PM 93655 articles. 1 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 5

Is it an issue with the class-level attribute declarations, or maybe the property-level attributes are incorrect? I've made the property get-only, so that shouldn't be the problem. 

I can't believe I'm the only one to have ever run into this; someone out there must know the answer.



7/9/2008 12:13:04 PM

In case anyone runs into this same issue, I found that exposing an object collection as a property isn't applicable when developing ASP.NET user controls (i.e. the files with the .ascx extension). If you want to create a component with this type of behavior, you should instead be working with ASP.NET custom controls, which derive from the Control or WebControl classes.



7/14/2008 4:14:35 PM

Similar Artilces:

<asp:image> 2.0 control vs. typical HTML <img> tag
What are the difference besides having the capability of doing the "~/path/" thingy?I can add the runat="server" to the <img> HTML tag and it will work the same as the <asp:image> control wouldnt it?Can anyone give me input on what big differences happen between both?Thanks! Victor A. Palma hiHTML controls provide slightly better performance than Web Controls, so gowith the img tag.Here's more info:

Custom User Controls (.ascx)
How can I incorparate truly dynamic pages? E.g. what is the best way to go to add my own ASP.NET User Controls (.ascx) to any module on any tab? ... I really need this feature. Thanks a lot. Cheers, Christian Weyer thinktecture In-depth support and consulting for software architects and developers Can you explain what you are trying to achieve, a User Control can be added to any module if it servers a purpose! What exactly do these User Controls do that would make the page dynamic? DO you mean adding a User Control as you would a module in DNN? ...

How to get parallel replicated processes?
We have the following problem: when a process which inserts 180000 rows in a table is working on a server, Replication Server works correctly, on line. But when we launch 3 parallel and identical processes on the origin, Replication Server spends exactly 3 times more than the time needed to complete the 3 processes in the original table. For example: - one process inserts 180000 rows in a table in 50 minutes and Replication Server spends also 50 minutes to insert those rows in the replicated table. - but 3 processes insert 540000 rows in the primary table in 90 minutes, while Repl...

How do I get the Sendto in Word to send to 6.5? #2
I have a newly installed workstation with Office 2003 on it and GW 6.5 client. On other workstations here under the "Sendto" link in Word there is a "Groupwise Recipient" but on this workstation there is not. The groupwise client was installed before the Office Suite so I am assuming that it should have been done the other way. Is there anyway I can get this configured without a whole lot of pain? Trust me - it isn't worth it. Forget about that feature. -- Michael J. Bell Novell Support Connection Volunteer Sysop Author of Guinevere (http://www.openha...

Properties & State Management -- Good Idea?
Hi, I've started to use an idea I had (though I'm sure I'm not the first to have it), but I wrap all my state managment variables in properties, like so... Private Property userName() As String Get userName = CStr(Viewstate("username")) End Get Set(ByVal Value As String) Viewstate("username") = Value End Set End Property Doing it like this allows me to "strongly type" my persisted variables, and I don't have to remember ViewState("uhwhatdidIcallitagain?") everyti...

Auto VScroll on User Objects
Good evening, I have a custom visual scrollable user object that has other user objects placed within and I=B4d like to know how can I simulate the datawindow's "auto Vscroll" feature, since the parent controll doesn=B4t seem to scroll up automatically when the focus is at any control outside its limits on the screen. Thank you for any help. Miguel. ...

Export users
Hi there, I was wondering if it's possibe to export all users from eDirectory and move the accounts to a totally different Tree/Server. If this is possible could you please point me to some documentation? I've been searching through Novell's site and most of the stuff I have read pertains to moving Groupwise. Thanks for your help! Chris -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This would be a breeze using something like Novell Identity Manager. Depending on the products you have you may already be entitled to the eDirectory driver. If your desire is ...

Get a TextBox to bind to SqlDataSource if DropDown = Other
I am trying to create a dropdownbox(TypeDDL) with an "Other" option. If the "Other" option is selected then I want to bind the text box(TypeTB) to the insert command.Here is my VB.NET code for this. Protected Sub InsertButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) If TypeDDL.SelectedValue = "" Then TypeTB.Text = "'<%# Bind("Type") %>'" Else TypeDDL.SelectedValue = "'<%# Bind("Type") %>'"End If End Sub There are tw...

What is the recommended way to impersonate a specific user in code?
Hi, What is the recommended way to impersonate a specific user in code? This article shows how to but to me it seems like there should be a managed code way to do this? Thanks. To clarify my question some more : What is the recommended way to impersonate a specifc user in Code using C# 2.0?...

Get Top Row
Is there a datawindow function that returns the top-most visible row on the screen? I am updating some details & then the Sort() and/or Filter() methods automatically scroll to the top row, whereas I want it to go back exactly to where it was. I thought I had seen something like this but cannot find examples in help... TIA, Ben it's a property dw_control.Object.DataWindow.FirstRowOnPage HTH Arnoud "Ben" <> wrote in message news:v#$ > Is there a datawindow function that returns t...

Getting Credentials
Hello, I need to use a class from an SDK that takes ICredentials as the data type for it's credentials property. I am currently using Forms based authentication. I am using the login control and have set up authentication to active directory. The authentication works fine and the encrypted cookie is stored. In the global.asax file I am creating the FormsAuthenticationTicket. After creating the ticket, I successfully create the GenericIdentity and GenericPrinciple, then add it to the context. Everything seems to work ok.  The only problem I have now is ---- How do I get the Cr...

Cant view live cam / cant watch HD video stream
Name: Rickard Product: Firefox Summary: Cant view live cam / cant watch HD video stream Comments: Firefox 3.1 Beta 3 Could not watch live webcam streams from When I watched hd videos on it was kind of laggy, even though I had loaded the whole video! Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b3) Gecko/20090305 Firefox/3.1b3 (.NET CLR 3.5.30729) From URL: Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC...

Bind data to html Div Control
Hello and thanks for taking a second. I am simply trying to query the Northwind database. The user will give the order number and the name of the employee who took the order and the order date will be displayed in separate html div tags. The page builds but my events do not seem to be running. Any Advice? Below is my .aspx and code behind. Thanks- Jason <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="orderinfoweb.WebForm1" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ><HTML> <HEAD>  <title>...

Get the day from the Calendar with an associated button and use it as filter a for CascadingDropDown list
I am attempting to change the following example to fit my needs but I am running into some problems and I would like some understanding how to best change this functionality. • I changed the values of the make to zones in the xml, which I have two (Adventure and Junior) • I changed the values of the model to days of the week (Sunday thru Saturday) • I changed the values of the color to available party start times 1. Is it possible to add the Calendar with an associated button or Calendar with a custom style and for...

Exception with DirectoryEntry.Properties
Hello,I'va an exception with some attributes when I tryMe.Session("dept") = DirEntry.Properties("DP").ValueSystem.Runtime.InteropServices.COMExceptionSome (like mail, uid) works, but some doesn't. It seems to be a "Format" problem....Any idea ?Thanks :) You will have to dig inside the COMException to the InnerException to see what the underlying issue is.  At this point, it is hard to tell.Ryan DunnWeblog The BookLDAP Programming Help Hi davfranckIt's always possible that object from which you are trying to read the property, doesn't support it, or more common, doesn't have it set.A...