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 > june 2006

Disabled textbox is nothing on postback :o(
Posted by M O J O at 6/29/2006 12:28:02 PM
I need to use Request.Form.AllKeys to get values of my textboxes, but disabled textboxes are not shown. Here's my code... <% @ Page Language="VB" %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < scr...more >>


viewstate and custom control
Posted by dave at 6/29/2006 10:15:03 AM
I have custom control with dropdownlist. I am using this custom control in a repeater. After the post-back the control properties that i stored in viewstate does not exist. They are all empty. When, where and how does viewstate get set with custom control? I would have expected that when...more >>

custom control in repeater
Posted by dave at 6/29/2006 9:19:01 AM
I have a custom control which consists of dropdownlist and textbox called ct1. The problem is that when i set a property of the dropdown list in the itemdatabound event of the repeater it uses that property value for all ct1 controls in the repeater. How can i have each control store/maint...more >>

Custom Datagrid Implementation
Posted by Brent Ritchie at 6/28/2006 8:47:19 AM
Hello, I have been given the assignment of creating a custom datagrid for our company. The specs are pretty simple: 1) Use a webservice to populate and do other processing tasks. So far I made a test web service and derived it from a common interface. The Custom datagrid uses this i...more >>

Dynamically Creating A CSS Class
Posted by Nathan Sokalski at 6/25/2006 11:52:59 PM
I have a control that creates a CSS class which I want to put on the page. Other people have told me that the best way to do this is using the RegisterClientScriptBlock method, even though it is not a script. I have done it using this method, but I am now writing my first control as a custom ...more >>

Acting on contents of a declartivly databound Drop Down List?
Posted by mc at 6/23/2006 3:02:23 PM
I've developed a custom access list user control. The control has a drop down list of people which is populated using a sqlDataSource Whenever I try to refrence the items in the list of people I get a null object error. I can refrence the control ok but in Page_Init / Page_Load / Page...more >>

DataBinding to SubProperties
Posted by Jason at 6/21/2006 2:16:02 PM
I have built a custom control that has, as one of its properties, a collection of another custom control. So controlA has property of type controlBCollection. At design time it looks like: <asp:controlA runat="server"> <asp:controlB commandName="Save" commandArg="<%#DataBinder.Eval(Co...more >>

Easy question (i hope)
Posted by dave at 6/19/2006 5:18:01 PM
I have built a custom control with a hidden html input box. I use this hidden field to hold a value that i wanted posted back to the server after the click event of a page button. Within this event, i am able to access the hidden field value through a property in my custom control. That see...more >>



Handling a click event in custom server control
Posted by Jowita at 6/16/2006 3:47:06 PM
I'm using VS 2005. I created a sample composite control with a textbox and a button. I'm having problems getting the button event. The control implements IPostBackEventHandler. Is it necessary if I just want to handle the event internally in the control? I added this code to CreateChild...more >>

Whats new in developing user control in ASP.NET 2.0
Posted by Kausar at 6/16/2006 12:00:00 AM
Hello all, I am new to ASP.NET 2.0 and fascinated to develop some user controls in it. so, before proceeding for this i want to know what new features ASP.NET 2.0 provides us to do the same. What are the enhancement in ASP.NET 2.0 for the development of user co...more >>

DefaultValue attribute doesn't get set in a composite custom control
Posted by Jowita at 6/14/2006 11:49:01 AM
I have a simple composite control with the following attributes: [ Bindable(true), Category("Appearance"), DefaultValue("Enter name:"), Description("The text for the name label.") ] public string NameLabelText { ...more >>

UserControls and DataBound Repeater
Posted by Alex Maghen at 6/13/2006 5:37:40 PM
I've built a few UserControls that have worked perfectly for a while. Now, for the first time, I want to use these controls inside a Data-Bound Repeater control. When the page first loads, my control works perfectly. But any kind of PostBack results in runtime errors in the control's PageLo...more >>

RaisePostBackEvent fires for only one instance
Posted by Jason Barnett at 6/13/2006 11:31:02 AM
I've created a web server control that should raise a ValueChanged event when the user changes the control's value and clicks submit (AutoPostBack is not desired). The control works well, until I drop another control of its class on the form. Then the RaisePostBackEvent fires only once (alwa...more >>

Finding the values of Dynamic Controls in a Composite Control
Posted by Bryan at 6/12/2006 2:43:38 PM
Hi Everyone, I've created a Custom Composite Control that creates a number of children -- Hidden Input Fields, to be exact. Because my control implements INamingContainer, I can't guaruntee what the names or IDs of these children will be after the control is rendered. So, after a post, h...more >>

Composite Control default style attribute
Posted by tim_cavins NO[at]SPAM hotmail.com at 6/12/2006 8:56:08 AM
I have a composite control that after dragging it onto the webform adds the following style attribute to the control: style="Z-INDEX: 101; LEFT: 104px; POSITION: absolute; TOP: 88px" How can I automatically remove that? I'd rather do it in the creation of the control rather than having the ...more >>

WebControl with CSS and Javascript
Posted by patrick.sannes NO[at]SPAM gmail.com at 6/12/2006 7:17:25 AM
Hi there, I'm creating a custom control with Javascript and CSS. It will be a nice overlay calendar with a result textbox. My main problem is that the Javascript is realy huge, so you want to include it in a seperate ..js file. But, then it is not bound with the WebControl.... What is the nor...more >>

Copying A Control Not As A Reference
Posted by Nathan Sokalski at 6/11/2006 11:59:08 PM
I have a Control that I want to copy as a copy of the Control, not a copy of the reference to the original. My reason for doing this is because some of the methods I would calling would prevent proper rendering afterwards. I access the Control as a parameter of a function, as follows: Priva...more >>

Where is Page.RegisterClientScriptBlock Available?
Posted by Nathan Sokalski at 6/10/2006 1:19:43 AM
I have used the RegisterClientScriptBlock method in external functions of mine (ones that are saved in a separate *.vb file), where I use them as follows: Public Shared Sub MyFunction(ByVal txtbox As TextBox) 'other code txtbox.Page.RegisterClientScriptBlock("mykey","myscript") ...more >>

UserControl property as dropdown at design time?
Posted by NorCan at 6/9/2006 2:51:06 PM
Hi I'm creating an ASP.NET UserControl that contains a DropDownList control. I'd like to be able to set the DataSourceID property of this DropDownList through a UserControl property that at design time gives me a list with the ID's of all DataSourceControl controls on the web page contain...more >>

Inherit from Wizard control
Posted by Martin at 6/9/2006 2:06:51 PM
Hi, I want to inherit from the Wizard control in ASP.Net 2.0, to add some properties, events and modify/replace the default template for navigation. I've started with a very simple class: public class SequencedWizard:Wizard { public SequencedWizard() { // // TOD...more >>

Writing single client script block for mutiple controls
Posted by Jason Barnett at 6/9/2006 10:30:01 AM
I'm using .NET 1.1 and I've created a server control that writes javascript to the output writer. The control works great, except when I add additional controls. The problem is that each control writes the same javascript block, which causes a stack overflow when it is executed. Could som...more >>

"Collision" in DropDownLists from two instances of same UserContro
Posted by Alex Maghen at 6/6/2006 7:43:01 PM
I have a UserControl which has only one constituent control, a DropDownList. I am having what seems to be an IMPOSSIBLE situation: In the Page_Load() of my ASPX, I am setting MyCtl1.SomePropery = "A"; MyCtl2.SomePropery = "B"; Inside my control, I pretty much set the DropDownList (D...more >>

Composite Control Design View
Posted by tim_cavins NO[at]SPAM hotmail.com at 6/6/2006 1:34:15 PM
I have a composite control with multiple text boxes and drop downs written in VB.net and Visual Studio 2003. It also contains properties such as Mini and DisplayJobFunction which are booleans. I am having two issues in the Design View: 1) The composite control originally comes up as an Er...more >>

LoadControlState won't be fired
Posted by Andrea at 6/5/2006 10:58:05 PM
I'm building a webcontrol, and I want to implement the COntrolState. Despite I've followed the MSDN sample, and checked with a lot of post over the net, the LoadControlState(object state) event won't be never fired. I don't understand why. this is the method call I do protected override...more >>

Book recommmendations
Posted by news.microsoft.com at 6/5/2006 10:06:09 PM
Anyone have recommendations for books on building ASP.NET 2.0 controls? All the books I turn up when searching that have good reviews are ASP.NET 1.0 books. TIA. ...more >>

Tooltip question
Posted by ODAN at 6/5/2006 3:51:19 PM
I have an application that was developed in ASP.NET/C#. On one of the pages, we are using tooltip to display the description of the textboxes. Wehn you move your mouse over a textbox the tooltip appears with a full description of the textbox on which you have your mouse. By default the tooltip...more >>

User Control in Custom Control
Posted by Eric Immerman at 6/5/2006 2:53:01 PM
I have a tough one that I am hoping somebody has run across. I have created a Custom Control that is a fancy Tab Control where each Tab is assigned to a Panel. Each Panel needs to be able to hold whatever content the user would like. I have this setup and everything was working fine. Ba...more >>

Composite Control - Panel scrollbars for "absolute" positioned child controls
Posted by Parag Mahajan at 6/2/2006 8:47:45 PM
Hi, I am developing a composite control in asp.net 2.0 framework. The controls (all types like HtmlInputButton, HtmlInputText, HtmlInputTextArea) I place or add to the controls collection of my composite control, all have the position style as "absolute". (My requirement is such that those ...more >>


DevelopmentNow Blog