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] 6

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...

Q: Getting detailed FK porperties
I'm running ASA 7.0.4 and I have the following problem: I want to get detailed informations about the foreign keys in my DB. This means I'm especially interessted in the ON UPDATE and ON DELETE constraints of a foreign key. I know how to get to this information via SYBASE CENTRAL, but I'm rather searching for a way to get these informations by means of SQL-Statements or the else. Thanks for any help, tips and hints, Tom. "Thomas Bergner" <> wrote in message news:$ > I want to get detailed i...

GPG for GUI users.
In windows: For Outlook: Install start Kleopatra to manage your keys. For thunderbird: Install start "OpenPGP Key Management" In Apple: For Apple Mail: Install (GPGMail) start "GPG Keychain" For thunderbird: Install start "OpenPGP Key Management" In Linux: For thunderbird: Install start "OpenPGP Key Management&q...

Constant User Blocks
I have a Powerbuilder Front End product & frequently have users whose connections create blocks for everyone/anyone trying to do any subsequent reports, even though they are in a "sleeping" state and their transactions have been "COMMITted" Has anyone else experienced this type of behavior? I can't isolate it to one type of transaction, but it happens about once a week. PB6.5 on NT SQL 6.5 on NT Thanks Tracy Vonick Do you have the auto commit set to false? Tracy Vonick wrote: > I have a Powerbuilder Front End product & frequen...

Unit Testing Controllers as a whole
 There are quite a few examples out in the wild for unit test controller actions. It's relatively straight forward. What I need to test now are the actions' complete lifecycle, including having the OnActionExecuting, OnActionExecuted cycle run to test filter, ViewData scrubbing and other things that can be done in a controller base for all actions rather than cluttering up each controls action code.For the most part, I think this is just a matter of calling Controller.ActionInvoker.InvokeAction. The problem seems to be that  while mocking HttpContext is easy, mocking ViewEn...

Can't Get Toolbar to Stick
On one of my Thunderbird profile accounts, I can't customize the toolbars. I go into View, select Customize, drag the icon to the toolbar and click done. The selection then shows on the toolbar. However, after I unload and reload Thunderbird it's gone. I've also selected Restore Default Set which appeared to work but was still unable to add this toolbar and have it stick. On the other profile's account it works as it should. Any ideas? On 8/14/2010 11:26 AM, Joe Brown wrote: Perhaps everyone is away or no one has an answer to this question? > On one ...

Functionalities of librarian and ordinary user in library management system
Hi I have doing a project named Library Mangement System by using contain two type of users.Librarian and ordinary user.What are the different functionalities can I used for librarian and ordinary user.Please specify all the possible functionalities for librarian and ordinary user in that system. Thanks and regards  Thanks & RegardsJinsoPlease mark as answer if this helped you....  HiLibrarianAdd BookDiscontinue BookRezone BookCheck if Book is in stockIssue Overdue FineReserve Book for UserTransfer Book to another Library Hire LibrarianFire LibrarianModify ...

/dev/disk/by-id/ cant boot
having booting problem because of detached hdd os 11.0 screen states waiting for /dev/disk/by-id/usb-seagate_desktop Note: I have a usb hdd count not get it mounted so in yast i put /media as the mount point in the yast-->partition-->sdb3. well i do NOT have the hdd drive because i took it back to the store I DO have root and can get in the recover mode but I DO NOT know command I am a noob -- Noob - I know Dell Laptop Insiron 9300 1.8ghz 1gig ram 40HDD ATI M300 MacBook 1.2ghz 1gig 160HDD VirtualBox Suse 11 ------------------------------------------------------...

Can I make a parent control to have an influence on the way his children are rendered?
For example, I want to have each of the children of MyControl (inheritance from control) to be rendered inside some div tag? Something like overriding the RenderChildren method, only that I need it to change each of the children individually.Thanks Hi, you may try to override your control's Render() method and, instead calling the base's Render, loop through all the child controls, verify their type, add custom html tags where needed, and invoke each child's RenderControl() method. This should work (not tested) for the immediate child controls. I can't imagine a way to ha...

Not getting 401-2 Access denied page
I have implemented NT Authentication on my site and it seems to be working fine except one thing that I am not getting 401-2 Access denied page once the user provides wrong credentials. Instead it displays the name of the virtual directory and says that you u are not authorized to view this page. Thanks Ashu If the credentials are not correct you should get : "HTTP 401.1 - Unauthorized: Logon Failed" You would get 401.2 if the user (who was successfully authenticated by IIS) was denied access in the web.config file using the authorization section. thanks...

get Data from a group
Hi all have anyone an idea, how i can get the row and the data from the header-group-columns??? thank's Michael E. Use FindGroupChange to obtain a row number in the group. "M.Erlinger" <> wrote in message news:3ffee7ff@forums-1-dub... > Hi all > > have anyone an idea, how i can get the row and the data from the > header-group-columns??? > > thank's > Michael E. > > no - that is not the complete solution for me. i must obtain the row-number in the clicked-event of the datawindow for a ...