Archived Months
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007
December 2007
January 2008
February 2008
March 2008
April 2008


all groups > asp.net building controls > december 2005

Composite Control and accessing complex properties of child controls - C# VS2005
Posted by Paul Yanzick at 12/29/2005 3:54:37 PM
Hello, I am trying to build a composite control that contains a few objects, in particular a calendar and a textbox. I have the bulk of the control built, however I would like to make some of the properties present at design time, however I am having some difficulty doing so. In particu...more >>

LoadControl and Validation Summary
Posted by Doug Heeren at 12/29/2005 2:52:02 PM
I am working on a project that dynamically loads controls from within Page_init so that the viewstate is preserved. On post back the control saves it's changs in the Page_load event. If the user navigates to another section the control is removed in the page load event and a second control is ...more >>

create enumerated property for custom control
Posted by Sergey Poberezovskiy at 12/29/2005 2:32:04 PM
Hi, I want to create a property that can only accept values from my custom list. Say 1, 5, 10, 15, 20, 30. I know I can easily create an enumeration with values set to those from my list, and have the Visual Studio designer display a list of enumerated strings shown in the property (e....more >>

newbie to creating web controls
Posted by GJH at 12/29/2005 10:18:08 AM
I am trying to develop some .NET web controls in VB or C# and need some help. Does anyone know any websites with a good tutorial on how to start. The MSDN site is not helping me at all. An example I have is code that will email, I simply want to create a button that has all the email code in...more >>

FormView Control
Posted by Bob Peek at 12/28/2005 10:22:03 AM
I would like to insert some number of Form View Controls onto a single web page in the code behind file. The number to be determined at run time. Is this possible? If so, Can I create a user control that incorporates a formview control, a sqldatasource control and other controls and then...more >>

Custom Column Widths
Posted by cbanks NO[at]SPAM bjtsupport.com at 12/28/2005 7:54:22 AM
I have a datagrid which displays five columns of data. Since several columns display "Y" or "N" or 1-9 I have modified all the column widths to display my data. Under normal viewing, the grid looks great when filled with data. When I go into an edit mode on a row, everything get's messed up....more >>

Add Project Reference Dialog...
Posted by spamseive NO[at]SPAM gmail.com at 12/28/2005 6:34:34 AM
I've designed a web control in VS as an ASP C# control. I've created a new project and want to add a project reference from it to the C# control's project. When I go to the Add Reference-Project tab there are no projects listed and no way to add projects. How can I get my control project to...more >>

server control collection with several types of properties
Posted by mr dropdown at 12/25/2005 3:31:01 PM
Is it possible to implement a server control that will look like this: <just:control> <columns> <columnTypeA id=1></columnTypeA> <columnTypeA id=2></columnTypeA> <columnTypeB id=3></columnTypeB> <columnTypeB id=4></columnTypeB> </columns> </just:control> While columnTy...more >>



server control with collection
Posted by mr dropdown at 12/25/2005 2:08:02 PM
Hello, I wrote a simple server control from a sample I found on the web in the following URL: http://west-wind.com/weblog/posts/200.aspx The control has the following structure: <myCtl:main> <Columns> <ColumnItem id="a"></ColumnItem> <ColumnItem id="b"></ColumnItem> </Column...more >>

Help needed with custom dynamic control.
Posted by NateDawg at 12/24/2005 2:30:02 AM
I’ve got a question about dynamic controls and retrieving the data back after the user enters information into them. Here is what I have so far. I made a custom control for this as I will need to use it multiple times and on many different pages. This control takes in a ListItemCollection an...more >>

Child Controls inserted in Code Behind
Posted by kruiz NO[at]SPAM tss.com.pe at 12/23/2005 3:16:42 PM
Hi, hope somebody could help me! ... I'm building a Toolbar Web Custom Control. So i created 3 classes, [ PersistChildren(false), ParseChildren(false, "Buttons"), ControlBuilder(typeof(ToolbarControlBuilder))] public class Toolbar: WebControl public class ToolbarButtonCollection: Coll...more >>

Composite Web Control and saving user changes on child controls.
Posted by Buzz at 12/23/2005 12:53:02 PM
Okay, having the same problem many others are having. Here is a simple example I cannot get to work: -- using C# a) Created an ASP.NET Web Project. b) Added a Web Control Library project to the solution calling the project CustomControlLibrary. c) I've tried a few different things b...more >>

extended Label webcontrol, doesn't populate it's children ??
Posted by KK at 12/23/2005 8:28:13 AM
Hi, I am extending couple of existing controls in ASP.NET like LinkButton, Label, TextBox etc.. I require these controls to contain a child control of MyControlType so ideally in HTML view for a label <asp:Label id="" [other properties...] > <cc1:MyControlType id="" [other properties...more >>

Reading attributes of nested properties
Posted by mr dropdown at 12/20/2005 8:56:03 AM
Hi, I have 2 questions: 1. How can I read attributes of inner property of a web server control? 2. How can I read inner properties of inner properties of a web server control? for example: <myControl> <myInnerProperty attributeThatIWantToRead="yes"> <PropertyThatIWantToRead AnotherAttr...more >>

referencing and anchor from within a usercontrol (ascx)
Posted by gary at 12/19/2005 4:21:59 PM
Hi, I am trying to reference an anchor in a user control with a url. This worked in 1.1 but no longer works in 2.0. The ascx control is located in a "/include" folder If you have a hyperlink control and you assign the navigateurl property = "../#anchor" whereby you want to add this # ref...more >>

referencing and anchor from within a usercontrol (ascx)
Posted by gary at 12/19/2005 4:21:27 PM
Hi, I am trying to reference an anchor in a user control with a url. This worked in 1.1 but no longer works in 2.0. The ascx control is located in a "/include" folder If you have a hyperlink control and you assign the navigateurl property = "../#anchor" whereby you want to add this # ref...more >>

reference to Composite Control
Posted by Sparticus at 12/19/2005 7:45:02 AM
Hi, I have created a composite control which, in its simplest form inherits from Control, implements INamingContainer and provides a method CreateChildControls. I add my custom control to the html of an aspx page, provide the register directive with a simple assembly name. The custom cont...more >>

communication between an application, custom controls, and user controls
Posted by Beatniks at 12/16/2005 1:20:13 PM
Hi, and many thanks in advance... I'm a little lost about how to proceed with communication between an application, custom controls, and user controls... Within a site I have... ShoppingCart.dll: (Code for a custom control that handles database interaction of a shopping cart: cookies, stor...more >>

Databinding on Composite Control
Posted by Steve at 12/14/2005 11:41:04 PM
I'm trying to implement databinding on a composite control and I'm getting an error with the data when I change the DataSource. The first time I set the DataSource and call DataBind() everything works fine, but when I set the DataSource to a new value (DataTable) and then call DataBind again,...more >>

Reset on Image based property
Posted by JezB at 12/14/2005 8:28:23 PM
I've extended (subclassed) a Button control and given it two new Image properties (for mouse over and mouse click images). These work fine but I've noticed that once I set one of my two new Images in forms designer, I cannot clear it since the Reset option is disabled on the right-click menu i...more >>

Controls that contain code: Code Blocks Not Supported
Posted by Microsoft at 12/14/2005 3:05:03 PM
How can I develop a custom control that can then be used to display dynamically generated data? I have created a simple custom control which I use to reproduce the same style box in my website repeatedly. The content for the box is placed between the tags of the control in the aspx file. How...more >>

place WebUserControl in X, Y location
Posted by Dave Johnson at 12/14/2005 8:12:24 AM
i built nested UserControls, and the parent control dynamicly generate the child contorls, but i have a problem with positioning them on the control page, how is it done for WebUseControl, i am sure its very simple and basic Question but as i am new to usercontrols help will be very appreciated ...more >>

Add form runat=server tags in Composite Control
Posted by DC at 12/13/2005 2:50:44 AM
Hi, I am using a Composite Control that encloses two Usercontrols. Both Usercontrols require to be enclosed in a <form runat=server> tag. I would like to add this tag within the Composite control (I cannot add the form tag in the aspx page or elsewhere). Question: how do I correctly rende...more >>

Help with creating a control that generates dynamic image
Posted by Dave Slinn at 12/12/2005 9:18:14 PM
I am using various System.Drawing classes to create a graphic at runtime, with the resulting image varied based on some properties the user may have set. Currently I have the graphic being saved to the file system (in a subfolder of the web app) and then my web control renders a src attrobu...more >>

Problem adding attributes to DataListItem..
Posted by J'son at 12/12/2005 1:04:01 PM
Guys, I have created a custom class that derives from DataList so that I can add some custom client side functionality into each new item row (<td>). Heres the class in its simplest form: public class MyDataList : DataList { public string MyValue1 = "alert('Hey there!');"; p...more >>

Returning value from composite custom web control
Posted by Bostonasian at 12/11/2005 10:20:12 AM
Lads, I've created a custom web control that's consisted of dropdown box and text box. In drop down there are following items: [text] | [value] "is" | "{val}" "starts with"| "{val}%" "ends with" | "%{val}" "contains" | "%{val}%" Upon postback, I want to replace {va...more >>

When does Control Id get changed ?
Posted by Brian Slack at 12/10/2005 12:50:57 AM
Hi In CreateChildControls I create a table and give each row an id based on the record number from a db i.e. trTwo.ID = "tq" & myRecordSet("QuestionId").ToString However when it is rendered on the page when the custom control is in a master page scenario the id is ctl_whatever_someotherju...more >>

Collection property "could not be initialized" in design mode for custom datagrid control
Posted by BluegrassNate at 12/7/2005 3:13:42 PM
Hello all, I've been working on a custom datagrid (custom web control inherited from DataGrid). I am attempting to add a new collection property to the control as described all over this group and the web... seems like it should be easy but I've been at it for about a week :-( Here's the p...more >>

Control.Controls bug? Control's child controls missing at the run time.
Posted by sinelnikov.andrei NO[at]SPAM gmail.com at 12/7/2005 1:46:05 PM
Hello, ..NET 1.1/VB.NET: I have a custom web control Public Class DatePicker Inherits Control Implements INamingContainer In the CreateChildControls I adding some controls to it: Protected Overrides Sub CreateChildControls() placeJavascript() MyBase...more >>

How to remove indent of ASP.NET Server Controls
Posted by MumHa at 12/7/2005 3:01:16 AM
Hi, I created a new webcontrol that inherited from CompositeControl, and on override of CreateChildControls() I added Panels. When I view html source code on browser, the source code was indented, but I dont want. How I remove the indent? Regards, Rafael L. ...more >>

Webparts design mode question
Posted by Jonathan Carter at 12/5/2005 3:41:21 AM
Has anyone been able to successfully get webparts to work properly in design mode for any browser except for Internet Explorer? My experience shows that the "dragability" feature doesn't work out of the box for Firefox, Mozilla, or Opera, but I've heard that some have gotten it to work. Any ...more >>

User Control and ActiveX control
Posted by xudeutsch at 12/1/2005 6:40:03 AM
Now I am hosting a user control(an assembly in .dll) in IE. I want to know the difference between this kind of control and ActiveX control. thank you....more >>


DevelopmentNow Blog