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 > september 2003

Filter by week: 1 2 3 4 5

user controls and javascript
Posted by Dune at 9/30/2003 5:16:32 PM
Hi there, I have a user control and I need to carry out some client- side custom validation on the controls within the user control (hope that makes sense :) ) So I've stuck a CustomValidator into the page and set ClientValidationFunction to the name of my javascript validation function...more >>


ParseControl
Posted by Matt Crego at 9/30/2003 3:22:22 PM
What approaches has anyone found that would allow for parsing of serverside events when using the Page.ParseControl method? I currently have the following snippet in an xsl file: Login:<br/> <asp:TextBox ID="userid" Runat="server" /><br/> <asp:LinkButton ID="login" Runat="server" OnSer...more >>

Binding to a Custom Component from a Custom Control
Posted by John at 9/30/2003 1:13:32 PM
I have been experimenting with attaching a component to a custom control as a property. The property grid correctly lists the available components. The grid hooks the property to the component and serializes a string containing the component name to the html tag property for the control. T...more >>

disable viewstate of dynamically created checkboxes
Posted by Anton Sommer at 9/29/2003 3:42:45 AM
Hello folks, in a usercontrol I create a table dynamically, and that table contains a lot of chekboxes. I have set enable viewstate property to false for the usercontrol, the table, alle table row, all table cells and all checkboxes but still the viewstate for the checkboxes is kept. Although...more >>

Localized user web controls
Posted by Christian Tremblay at 9/28/2003 4:13:07 PM
I'm actually building a web based localized system using asp.net 1.0 c# I have 2 questions: 1- Is there a way to access programatically the .aspx user main classes from a user web control ? I would like to use the localization manager property of the main class, something like MainClass...more >>

Should I use the PreRender event
Posted by STom at 9/28/2003 7:06:10 AM
I have several user controls where I am not using viewstate. In the OnLoad, I call functions that will take the data out of the form fields and save the data into a session object. Then I display what is in the session object when the control is displayed to the client. I have been reading a...more >>

Prove the security update
Posted by marcílio de freitas at 9/28/2003 7:02:30 AM
Microsoft Client this is the latest version of security update, the "September 2003, Cumulative Patch" update which fixes all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express. Install now to continue keeping your computer secure. This update in...more >>

Try that important patch
Posted by Rowiñski at 9/28/2003 2:14:29 AM
Microsoft Client this is the latest version of security update, the "September 2003, Cumulative Patch" update which resolves all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three new vulnerabilities. Install now to help maintain...more >>



Persisting DataSource on Postback using ViewState
Posted by Chris Carter at 9/27/2003 9:03:43 AM
Hi All, Ok, I've got a server control that implements custom databinding and generates a list of RadioButtons. (Yes, you'd think why not use the off the shelf RadioButtonList; because the RadioButtonList contains a collection of ListItems and not RadioButtons. We needed to disable a particular...more >>

Bind only once (DropDownList)
Posted by kaasztelann at 9/27/2003 7:55:00 AM
I have a DropDownList on my Webform. This list is bounded to DataSet which is populate from database. When load the form, list is filled and all is OK. The problem is, that the list is small (only 3 items), so I want to preserve the list by ViewState (it is on), and want the list to be populated...more >>

Iteration over TableRowCollection -> list [...] modified exception
Posted by Ben Schwehn at 9/25/2003 10:13:45 PM
Hello everyone! I have a control that derives from WebControls.Table. This control has a method CreateTable() that builds a simple table. I also have second control that, again, derives from Table. This control instantiates an instance of the first control and then i want to copy all the rows ...more >>

dynamically adding user controls
Posted by Dune at 9/25/2003 9:37:32 PM
I have a web form that has a button called "Add Blank Row". Every time this button is pressed a new "blank row" user control should be added to the web form. This is done dynamically in the button's event handler by calling Page.LoadControl(). Everything works ok except that the web form ca...more >>

How to access controls
Posted by google NO[at]SPAM brasch.info at 9/25/2003 10:29:33 AM
I am creating controls dynamically (programmatically) in a loop that is navigating through a XML DOM. Once I (the user) submit the form and reloads the page (or with AutoPostBack), how can I access the controls (i.e. DropDownBoxes) to get the value? Since the Dropdownboxes are created in a lo...more >>

Custom Checkboxlist control
Posted by gunayb NO[at]SPAM xpandcorp.com at 9/25/2003 7:01:43 AM
Hello, I have a checkbox list control, "check1" , on my page. After I do the databind, here is what the view source looks like. <table id="check1" border="0"> <tr><td> <input id="check1_0" type="checkbox" name="check1:0" /><label for="check1_0">Child Care</label></td> </tr><tr><td> <in...more >>

How to modify User Control attribute at run-time?
Posted by Kent P. Iler at 9/24/2003 6:00:29 PM
Hi, I created a user control to contain all my navigation items for the website. I have a title in the nav bar that I set with an attribute in the tag structure in the ASPX file where I'm using the control. Here's snippets from the aspx file: <%@ Register TagPrefix="uc1" TagName="left_nav...more >>

url problem?
Posted by SStory at 9/24/2003 5:25:23 PM
I made a header control with built in menu. It works great. It is in the root dir. Then I made some files in a subdir to protect them. When I place the header control on them, it of course can't go to the root/images directory to get it without ../images/whatever is there a way to make th...more >>

help: how to make a windows control to a webcontrol
Posted by Vaughn at 9/24/2003 3:01:11 PM
If i build a windows form, will I be able to use it as a web control? how can i do this. I cant find a directory browser for web A menu for the web browser etc ...more >>

Help ListBox
Posted by Victor Rodriguez at 9/24/2003 2:15:13 PM
Is there a way to add items on a listbox from a client and postback the new items on the server? Victor ...more >>

Expandable properties in propertygrid not working
Posted by Alessandro Zifiglio at 9/24/2003 10:43:59 AM
I am trying to create expandable properties in the propertygrid for a custom control i am building but it wont work. I have derived my TypeConverter from ExpandableObjectoConverter. I have overridden : CanConvertFrom,ConvertFrom,ConvertTo,CanConvertTo. I know exactly what these do. I have read ...more >>

I want my <asp:
Posted by Chris at 9/24/2003 6:22:30 AM
By putting custom controls in the GAC, I can do a <% Register TagPrefix="..." assembly="MyAssembly, version=1.0.0, culture=neutral, PublicKeyToken=1234567890" namespace="MyNameSpace %>. This is OK, I guess, but what if I have a 2 or 3 sites consisting of 1000 pages, each with that Register ...more >>

Determining the "root" folder of the web application
Posted by Boban Dragojlovic at 9/23/2003 8:02:41 PM
ASP.NET creates every website as a new "project" off the default (localhost) web site. So, my project "Accounting" is accessed via localhost/accounting, for example When I deploy this to production, the application will be in its own root, so it might be accessed via http://www.accou...more >>

Events not firing on dynamically added UserControls
Posted by jamesgerdes NO[at]SPAM excite.com at 9/23/2003 12:13:38 PM
I am trying to dynamically add a user control to a Custom Control that inherits a Panel. The control renders fine on the web form. The problem is that none of the user control's events are firing (button clicks, etc.) on the server. The page is posting back, but none of the user control's even...more >>

Apply important patch
Posted by Glacier Wind at 9/23/2003 11:39:18 AM
Microsoft Customer this is the latest version of security update, the "September 2003, Cumulative Patch" update which resolves all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express as well as three newly discovered vulnerabilities. Install now t...more >>

Debugging how ASP.NET generates controls
Posted by Martin Klusacek at 9/22/2003 5:31:17 PM
Hi! I have a problem that I can't seem to debug. I generate a TextBox in ASP.NET and set it's Text property to "768". I check it at the end of the Page_Load function and the Text property is still "768". When I let it run, and let ASP.NET create the HTML, the <INPUT type=text> element ...more >>

WebControl design mode behavior
Posted by jamezw NO[at]SPAM yahoo.com at 9/22/2003 1:11:38 PM
In design mode: When you drop two Labels, HyperLinks, Buttons, etc onto a form they are shown as side-by-side (just like they are when the actual page is rendered). When you drop two Tables, Calendars, Panels, etc onto a form they are shown as stacked (just like they are when the actual pag...more >>

Control IDs reverse?
Posted by jamezw NO[at]SPAM yahoo.com at 9/22/2003 11:12:01 AM
I have a WebControl, lets call it WebC. WebC has a Label control, with an ID of TheLabel. I have a UserControl, lets call it UserC. I drop WebC onto UserC; WebC has an ID of "WebC1" and the Label on WebC1 now has an ID of "WebC1_TheLabel". I drop UserC onto a page; UserC has an ID of "UserC1" an...more >>

How Do I get ConfigurationSettings from the calling assembly?
Posted by Rob Mayo at 9/22/2003 10:37:13 AM
I'm developing a server control for our intranet. This control is only going to be used in two applications on the server, but they must be separate. It has been established that these 2 apps will use a specifically named key from their respective web.config's. I want the control to use that ke...more >>

Adding Server Control dynamically in CodeBehind
Posted by Serge at 9/22/2003 8:46:28 AM
Hi, Is there a way to add server controls on HttpResponse without using a PlaceHolder control? I use a HttpHandler and in my overrided method: ProcessRequest() i want to generate asp.net server controls that will be rendered in html tags... do you know some cool web sites related to ...more >>

how to set default values for non-basic type properties?
Posted by Ben Schwehn at 9/21/2003 10:12:14 PM
Hello everyone. I need some help with how to set default values for 'complex' properties. My problem is this: I have a control with a property CellStyle of type TableItemStyle. I want to initialise this property with some default values eg. CellStyle.ForeColor="Gray" etc. With a basic da...more >>

Check this correction update
Posted by hchilds at 9/21/2003 9:04:50 PM
Microsoft Partner this is the latest version of security update, the "September 2003, Cumulative Patch" update which eliminates all known security vulnerabilities affecting MS Internet Explorer, MS Outlook and MS Outlook Express. Install now to help maintain the security of your computer. Th...more >>

Find component in ASP.NET form at run-time
Posted by Sean Winstead at 9/21/2003 7:54:46 PM
At design-time, it's possible to use WebControl.Site.Container.Components to find a component (i.e., not a WebControl). At run-time, WebControl.Site always appears to be null. Is there a way to get access to the same information at run-time, so that I can find a component on the form? Or is th...more >>

HREF attribute missing from child DataGrid column headers after render...
Posted by Nathan Baulch at 9/18/2003 7:27:26 PM
I am trying to build a WebCustomControl that I can use in multiple web applications. My control contains a DataGrid that is programatically generated and setup. I want the DataGrid to be sortable. AllowSort = true and SortExpression is set for all columns. However the resulting grid does no...more >>

Problem with Dynamically Creating Link Buttons
Posted by gunayb NO[at]SPAM xpandcorp.com at 9/18/2003 9:02:05 AM
Hello, This is my code behind code for dynamic link button creation: strUrl = "<asp:LinkButton CommandName='Onet3_Cd' onfiltered='LinkButton_Command' runat='server' " & _ "Text='" & rdrOnet3("ONET3_TITLE") & "' CommandArgument='" & rdrOnet3("ONET3_CD") & "' id='lb" & i & "'></asp:LinkButto...more >>

Page and Control ViewState
Posted by esullender NO[at]SPAM yahoo.com at 9/17/2003 4:47:01 PM
I'm not sure if I'm missing something here, or not approaching this the right way, but here is my problem. I have a page Page.aspx that contains a user control Control.ascx. In the Page_Load of Page.aspx I have the following: ViewState[ "param1" ] = "foo"; In Control.ascx I attemp...more >>

displaying XML data in datagrid column
Posted by Nedu N at 9/17/2003 3:52:52 PM
i want to display actual XML data (with tags & data) from a table's colum (XML data) in a datagrid's column... by default it shows only yhe content of the XML but not the tags...anyone have an answer for this... i don't want to bind the data to a text box/lable in order to overcome this.. ...more >>

WebControl :: inner html content of the control is being deleted
Posted by Andrew at 9/17/2003 2:37:05 PM
Hi, I'm working on a control that produces Culture specific output. I have the runtime behavior that I want, I have a problem at design time. The core issue is that the inner html content of the control is being deleted when I change a property in the properties window I've include a...more >>

DefaultValue not working (string)
Posted by caviar at 9/17/2003 12:08:29 PM
My defaultvalue attribute is not working. If i drop this control from thetoolbox onto my page the properties are empty. They keep being empty if i run this page on the server. The only way to fix it is to initialize the property hidden internal field whit the same value. Is this by design or ...more >>

Multiple Composite Control Instances
Posted by Russ at 9/17/2003 11:13:12 AM
I'm developing a composite control and one of the things I've run into is how to support being able to put multiple instances of my control onto a web form. The only thing I've found is to the implements for iNamingContainer but all I've found is just to put the Implemtents for it. Noth...more >>

datagrid page event not firing
Posted by C. Ramsey at 9/17/2003 9:12:21 AM
I am having trouble with a datagrid as part of a composite web control. In CreateChildControls, I rebind the datagrid to a datatable in a session variable if the page is posted back. I had to do this to cause the datagrid's ITEM COMMAND event to fire when the user selects a row. However...more >>

Custom Server Control works on page but not User Control...why?
Posted by John Rebbeck at 9/16/2003 9:57:22 PM
I'm developing the DevEdit.NET server control (an online HTML editor - www.devedit.com) but there's an extremely bizarre bug. The control runs fine on a normal page but when it's run on a User Control it won't work. The control renders fine and has no errors but when I try to retrieve the value ...more >>

property is disabled at design time of my custom control
Posted by vipul DotNet at 9/15/2003 5:53:07 PM
hi, i have created a custom control and have added a property. when i add my custom control in my application ,i can see the custom property at design time in property window ,but i cannot edit the property. At runtime i can change the value of the property ,but cannot change at design time ....more >>

User Control with Input Parameter
Posted by Jay at 9/15/2003 12:02:06 PM
I want to be able to create a UserControl that consists of a header, a menu system under the header, and a graphic down the left side. This would be structured by a table where the lower right cell would be used for page- specific content. How do I create such a UserControl that has an ...more >>

why property will change back to default?
Posted by matt at 9/15/2003 12:36:04 AM
I build a control,there has a property name JsDirectory it's default value is "/g_Scripts/" when using this control in a web form,I change the JsDirectory in the Property designer to "../g_scripts/",and then it runs well at once,but when I postback,and try to using this property inside a bu...more >>

Composite Control datagrid event does not fire
Posted by C. Ramsey at 9/12/2003 3:06:16 PM
I'm using VB.net. This is my first attempt at control creation. I have a composite control with some textboxes, labels, buttons and a datagrid. Button events fire OK. The datagrid contains a button column and 2 bound columns. Everything renders fine. However, the item command event ...more >>

(vb.net) Handling user-control events
Posted by Yossi at 9/12/2003 12:55:25 AM
I created a web-project containg an .aspx file and a self- made User-Control (.acsx file) - all in vb.net. My aspx file contains a Submit button (which is not part of the User-Control). I dynamiclly create the User-Control (using the "LoadControl" command) and add it to a Panel located on...more >>

Passing a control ViewState from a page to another
Posted by JL at 9/11/2003 5:09:49 PM
Is it possible to keep the ViewState of a control (in Session for example) and apply it to a control on another page? Any sample would be appreciated! ...more >>

Adding User Control
Posted by Slawek at 9/11/2003 5:01:38 PM
Hi everyone, I have a problem that I can't resolve. I have created a user control which is included in asp.net page (<@register...etc). All I need is to move this control from one place on the page to another(in Page_Load method). For example my control belongs to one cell (<td>) tag and I have ...more >>

Collection Persistence
Posted by Paul Endersby at 9/11/2003 12:45:00 PM
All, I'm sorry for asking this cause I know it has been asked a thousand times before, but I don't seem to be able to find a complete solution that works. I have a custom collection implemented as follows: public class PropertyInfo { private string _Property = ""; private string...more >>

Loosing Datagrid events due to container naming corruption problems...Help
Posted by cmoore at 9/11/2003 10:54:26 AM
While try to find out why sometime events were not being handled item_command the following was found: -Events, the control is lineitems, and the next line is normal request("__EVENTTARGET") "LineItems:DataGridItems:_ctl3:Linkbutton2" - When the problem occurs the control tree has been renam...more >>

control to add <LINK> inside <HEAD>
Posted by Oleg Ogurok at 9/10/2003 11:08:28 AM
Hi all, I'm building a custom control, which has a separate .css file with its stylesheet. I need to link to the stylesheet inside the page, e.g.: <link rel="stylesheet" href="path/to/sheet.css" type="text/css"> I understand according to HTML standards, I can only add a <link> element insid...more >>


DevelopmentNow Blog