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 > february 2007

renderbegintag without any tag
Posted by xenomur at 2/27/2007 6:33:53 AM
Is there possible to use renderbegintag without any tag ? I created a webcontrol library. The output of control there is span tag. How can i disable it ? I want to put any tag at html output of webcontrol library. Thank you ... ...more >>


Programmatically Assign Data Binding Expression?
Posted by Mark Olbert at 2/26/2007 4:32:29 PM
Is it possible to programmatically assign a databinding expression to a child control of a composite control. For example: protected override void CreateChildControls() { Label aLabel = new Label(); Controls.Add(aLabel); aLabel.Text = "<%# SomeDataBindingExpression %>"; ... } - Mar...more >>

ID Assignment?
Posted by Mark Olbert at 2/26/2007 3:55:15 PM
I would like to know more about how the ASPNET runtime assigns unique control IDs to the controls on a page. I'm curious because it doesn't appear to be "fixed"...which causes problems with composite controls which contain controls doing postbacks. Here's what happened to me: I have a textbox an...more >>

web.config servercontrol binding problem
Posted by Patrick F at 2/25/2007 2:09:03 AM
Hi, I created a very simple server control, but i cant bind it in web.config, i keep getting this error message: Parser Error Message: Could not load file or assembly 'LaberImage, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d757f12d29dc4c83' or one of its dependencies. The located assem...more >>

AddParsedSubObject and Multiple Identical Property Types
Posted by Mark Olbert at 2/24/2007 9:43:34 AM
I have a custom composite control decorated with ParseChildren(false) and PersistChildren(true) because I want to parse the inner markup for custom controls. That part works fine. But the "top level" control also contains a series of style properties that I want to persist using inner markup, to...more >>

Persisting Child Controls, Property Collections and Individual Properties
Posted by Mark Olbert at 2/21/2007 12:09:32 PM
I have a custom composite control whose markup needs to contain child controls, an array property, and simple properties, all as nested tag elements, e.g.: <cc1:MyComposite runat="server" id="whatever" SimpleProp1="somevalue"> <ChildControls> <-- this is a property collection, of controls <...more >>

Custom controls in a Formview
Posted by VictorH at 2/20/2007 12:37:27 PM
I have a custom control in a Formview. This custom control consists of a textbox, a label and some code-behind. The code behind generates a codenumber in the label based on a database and the entry in the textbox. Everything works fine. I bind with two properties the textbox and the label text...more >>

Can you set a "required attribute" on control property?
Posted by Cameron Eckman at 2/20/2007 10:41:08 AM
When creating a property for a server control can you set some sort of "required attribute", so that the developer sees the browser message you see when you leave off an attribute on a Microsoft control: Parser Error Description: An error occurred during the parsing of a resource req...more >>



Designers Not Called for Child Controls
Posted by Mark Olbert at 2/18/2007 9:29:37 PM
In design-mode, when my databound composite control creates its child controls and adds them to its control collection, the designers for the newly-created child controls (which are also composite databound controls) don't get called. Why is that? I thought the designer was always called when a ...more >>

Updating Custom Control at Design Time
Posted by Mark Olbert at 2/18/2007 3:54:35 PM
Okay, I'm confused: I have a custom composite control which has several "steps". I've created the DesignerActionList infrastructure to move between the steps at design time. The methods that control the movement get called, the "step state" gets changed...but the design surface doesn't update to r...more >>

GridView DataBind() Not Working
Posted by Mark Olbert at 2/16/2007 9:43:12 PM
I have a GridView as a child control in a custom composite control which is stubornly refusing to databind at design time. I'm convinced I must be missing something about how the databinding process works differently at design time. Here is the code that constructs the GridView in CreateChildCon...more >>

Want to add row under selected row of gridview
Posted by ujjc001 NO[at]SPAM gmail.com at 2/16/2007 10:29:51 AM
I used to know how to hijack the last cell of a datagrid when it's selected but can't seem to with a gridview. It's been a while, but I seem to remember adding something like this "</td></tr><tr><td colspan=4>testinghere</td></tr>" to get another row that I could edit. I don't know what's best...more >>

Masquerading as a Different Control at Design Time
Posted by Mark Olbert at 2/16/2007 8:36:04 AM
I'm building a custom control which is essentially a customized version of the Wizard control, although it doesn't derive from the Wizard class. It's designed so that you can add a sequence of a limited number of types of steps to the control (e.g., an Introduction step, a grid-select step). Th...more >>

Designer Support for Derived Wizard Class
Posted by Mark Olbert at 2/16/2007 7:38:15 AM
I've written a "SmartWizard" class that essentially adds initialization and exit handlers for the individual steps, allowing for easier control over how a user walks through the wizard. But I've run into a problem with the design-time support. With a regular Wizard, clicking on a step in the sid...more >>

Exposing Inner Controls at Design Time
Posted by Mark Olbert at 2/16/2007 7:27:44 AM
I'm building a custom control which is essentially a customized version of the Wizard control, although it doesn't derive from the Wizard class. It's designed so that you can add a sequence of a limited number of types of steps to the control (e.g., an Introduction step, a grid-select step). These...more >>

Complex Property with Subproperties Crashing VS2005 SP1
Posted by Mark Olbert at 2/15/2007 7:39:14 AM
I'm in a bit of a pickle here: I've got some kind of problem involving persisting some complex properties on a custom control, but because VS2005 SP1 keeps crashing when it encounters the problem I'm at a loss as to how to figure out what's wrong. Here's a sketch of the custom control and proper...more >>

Set readonly property on cell level in a datagridview
Posted by Patrik at 2/15/2007 12:00:00 AM
Hi, I have a datagridview column that will contain both editable and non-editable values. I have set the columns readonly property to true. I then use the AddRows event to check the value of an hidden column and if that is false i set a specific cells readonly property in the column to fa...more >>

Subclassed Wizard Control Doesn't Pass Through Design Time Behavior
Posted by Mark Olbert at 2/14/2007 10:28:08 AM
I wrote a customized derivation of the Wizard control, which works fine at runtime, but doesn't behave properly at design-time. Specifically, when I click on the links for the individual steps at design time, the display doesn't update to let me see (and edit) the controls contained in that partic...more >>

ITemplate container will not render.
Posted by cmartinbot at 2/12/2007 11:32:35 AM
Hello and TIA. I have a very simple server control that has one property that needs to be rendered in an ITemplate. I can't seem to figure out why it won't render with the <%# Container.Value%> syntax inside the declarative template. The container control for the template is being instantia...more >>

Newbie, error between asp.net 1.1 and asp.net 2.0
Posted by verci at 2/8/2007 1:14:48 AM
Hi guys, sorry if this seems stupid :( I'm running VS2005 Professional, SQL Server Express 2005, Win XP Pro SP2, ASP.net 2.0, thanks in advanced for your help. I trying to migrate an application build on asp.net 1.1 to asp.net 2.0, I get an error saying: Public member 'Format' on type 'D...more >>

Newbie, submit form error on postback
Posted by verci at 2/7/2007 5:17:26 PM
Hi guys, I'm running VS2005 Professional, SQL Server Express 2005, Win XP Pro SP2, ASP.net 2.0, so far I've been stuck for 2 days, thanks in advanced for your help. I trying to migrate a small forum application build on asp.net 1.1 to asp.net 2.0, the problem is when I try to open the fo...more >>

Referencing Repeater Data in a User Control from a Page
Posted by BigJohn at 2/7/2007 11:46:01 AM
I have successfully displayed text boxes in a repeater. The repeater is in a User Control. The User Control is in a container which references a master page. I have another user control which contains text boxes. For this one, the simple syntax of: dim ctlWork as Textbox ctlWork = ctyp...more >>

adding controls at runtime
Posted by kalaivanan at 2/6/2007 11:18:09 PM
hi, i am trying to add a datagrid control to a web page dynamically. i am able to do it while i used the following code in the page load event of the form in which i am going to add the control. DataGrid dG = new DataGrid(); Control frm = FindControl("frmSnAInformation"); frm.Controls.Add...more >>

Callback
Posted by MurtazaGandhi at 2/6/2007 5:02:42 PM
any hints on how to use this feature ? ...more >>

Event Bubbling and Templated Controls
Posted by Mark Olbert at 2/5/2007 12:52:40 PM
I'm hazy on how event bubbling (and event handling, for that matter) and templated controls should work in a custom control. The specific control I'm working on should have two properties set (SelectedValue and SelectedText) whenever the user makes a selection within the control. This obviously is...more >>

Time Picker
Posted by Tamer Ibrahim at 2/2/2007 12:03:55 AM
I'm trying to build a time picker and I have no idea how to do this using C#. Any help will be most appreciated. ...more >>

Problem with overriding Paint method for a DataGridViewButtonCell
Posted by Patrik at 2/1/2007 10:55:43 AM
Hi, I am trying to build a custom button cell for my DataGridView. I found = this code below that works fine if you want an ordinary button. What I = want is the flatstyle look. The only thing I would like to customize is = the size of the button. How should I implement the Paint if I want the...more >>


DevelopmentNow Blog