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

Filter by week: 1 2 3 4 5

PropertyExtender can affect render??
Posted by Arthur Dent at 3/31/2006 10:35:53 PM
I was thinking for learning to write a propertyextender class which would add some extra attributes to a controls on a form before rendering. Can i actually do this though? Would a property extender be able to somehow hook into the rendering life of the form and to add or alter the properties ...more >>

what is rand?
Posted by Amelyan at 3/30/2006 9:29:02 PM
Often, I see something called "rand" or ".rand" or "rnd" in url query parameter, for example in yahoo mail url. E.g. http://someurl.com/a.aspx?id=123&rand=91g3obstudb1r or http://someurl.com/a.aspx?Rnd=1.2341123 What is it used for? Thanks ...more >>

Custom Control and Toolbox not working
Posted by dave at 3/30/2006 10:27:02 AM
Yesterday i was creating custom controls and adding them to a project as a reference. Things were great. As I created a new control it would show up in the toolbox automatically. Today, however none of the controls that i reference show up in the toolbox. What is going on. Any help wo...more >>

ASP.Net 2.0: Help with ClientScriptManager
Posted by Rory Clark at 3/30/2006 8:52:54 AM
I'm working on a custom control that needs to register client script to the page. string key = "ScriptKey"; string script = "<script language=\"javascript\"> alert('Hi'); </script>"; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), key, script, false); The code executes, but n...more >>

Problem with User Control and unset references to controls within
Posted by Sam Martin at 3/30/2006 6:26:01 AM
Hi, I have got a User Control that contains for the sake of argument, a single DataList control. eg. <asp:DataList id="DataList1" runat="server" RepeatDirection="Horizontal" RepeatColumns="4" Width="100%" GridLines="Vertical"> <ItemTemplate> asdf </ItemTemplate> </asp:DataList> VS.N...more >>

error in adding user controls at runtime
Posted by rushikesh.joshi NO[at]SPAM gmail.com at 3/30/2006 5:40:58 AM
Hi All, I have created my own WebControl and want to add it in my aspx page at runtime. it's compiling perfectly, but when i m going to execute, it gives me error of "Object reference not set to an instance of an object." in my server control (ascx.cs file) There is a table in my user ...more >>

"Object reference not set" when loading a textbox in a user control
Posted by Monty at 3/29/2006 4:33:26 PM
Hi All, I have a user control that shows name and address for a person in a text box. When the page hosting the control loads up, it calls a method on the user control that loads up the textbox fields. Occasionally, but not all the time, I will get an error when I try to set the value of on...more >>

window not closing
Posted by gurvar at 3/29/2006 3:09:02 PM
Hi, I'm using window.close() command in a pop box (YesNo.aspx) embedded in a ASP button clcik command. Its a pop up confirmation for Yes or No. If either of them is clicked the window seems to get enlarged instead of closing after it does its function. How can I get to close the window when I...more >>



Control Event Handlers aren't called when used in PlaceHolder
Posted by Craig at 3/29/2006 1:57:02 PM
I have a custom control that I'm adding to a Placeholder, when I click on a button within my control, it should fire an event handler. This works fine if I simply add the control to a page, but if I add the control dynamically to a placeholder, the event handlers don't get called. ...more >>

User Control - Properties
Posted by Paul Say at 3/28/2006 10:13:00 PM
Can the properties of a User Control be made available to be set in the properties panel in visual studio at design time. ...more >>

Custom DataSourceControl with parameter collection at design time
Posted by MattBell at 3/28/2006 2:09:02 PM
I have a custom DataSourceControl which has a parameter collection defined as a property on the object. While everything works just fine I'm having problems with the design time implementation of the control. I'm getting an error: 'DocumentDataSource' could not be set on property 'SelectPara...more >>

regex replace
Posted by AVL at 3/26/2006 8:55:01 PM
Hi. I've a requirement in regular exp.. I need to replace a pattern...can anyone help me out,... My input string is as below <img src="c:\windows\images\bluehills.jpg"><a heref="sfjs"> <img src="c:\vij\granny.bmp">......... My output string should be like <img src="D:\images\bluehills.jp...more >>

playing audio n video files
Posted by AVL at 3/26/2006 2:53:23 PM
Hi, I want to play audio n video files in my web application... How can I do this? Are there any samples.....more >>

missing identifier ?
Posted by Jon Paal at 3/23/2006 2:00:26 PM
what's missing here ? Compiler Error Message: BC30203: Identifier expected. Source Error: Line 11 Line 9: Public Class GetVol Line 10: Line 11: Private Shared<DllImport("kernel32.dll")> _ Line 12: Function GetVolumeInformation(PathName As String, VolumeNameBuffer As S...more >>

need example of how to get assembly info
Posted by Jon Paal at 3/23/2006 12:32:48 PM
Trying to get assembly and hard drive info any working examples in vb available ? I couldn;t find any examples for assembly info. I tried this for hd info but no success. Imports System.Management .... Public Shared Function Volume(ByVal strDriveLetter As String) As String If strD...more >>

compositedataboundcontrol with template databinding problem
Posted by Samuel at 3/23/2006 3:30:27 AM
Hi everyone, I am new to this ASP.NET 2.0 feature. I am having a hard time getting the databinding syntax evaluated in my template for a control that inherits the CompositeDataboundControl that is new to ASP.NET 2.0. I don't have such problem with a control that inherits from CompositeContr...more >>

Web derived controls in VS2005 designer view
Posted by postings NO[at]SPAM alexshirley.com at 3/23/2006 2:54:34 AM
Hi I'm more or less desperate here, I've posted this in a few forums now over the months and got absolutely no response. It would be very much appreciate that you could help in any way here... So take pity :) I have a control derived from a drop down list written in VB.NET (ASP.NET 2.0) tha...more >>

Usercontrol enable property
Posted by greatdane at 3/22/2006 1:01:26 PM
I have a usercontrol with a textbox. I displayed the control programmatically on my .aspx How could I manipulate the 'enable property' and/or bordercolor of the ucl textbox from my .aspx page?...more >>

Asp.net2 How can I create my custom CompositeDataBoundControl
Posted by Dédé at 3/22/2006 12:00:00 AM
Hi I'd like to create my own CompositeDataBoundControl to show and edit data with other custom webcontrols. In the MSDN there is a small sample : http://msdn2.microsoft.com/en-US/library/system.web.ui.webcontrols.compositedataboundcontrol(VS.80).aspx I think this sample is too short... ...more >>

dot net 2.0
Posted by Jon Paal at 3/20/2006 8:25:45 PM
where to find instructions on how to license a custom server control ...more >>

Composite Custom Control - Textbox Readonly Bug
Posted by Nick Stansbury at 3/20/2006 2:51:43 PM
Hi, ASP.Net 2 - Strange bug / problem observed with the use of the readonly property in composite custom controls. Using the class shell defined below, the issue is with the readonly property. If you set the inner text box's "ReadOnly" property to be true, and then use javascript (in this ...more >>

Maintaining state in programmatically created composite user controls
Posted by mark.norgate NO[at]SPAM gmail.com at 3/20/2006 4:16:14 AM
Hi I'm writing a timesheet application in ASP.NET (framework 1.1, VS 2003) that includes a user control to manage project time allocation (ProjectDetailsControl). This control is a composite control that includes several DropDownList objects for project code, name and so on, as well as TextB...more >>

Reference Controls in MasterPage?
Posted by clintonG at 3/19/2006 3:57:57 PM
I'm trying to build a class file in App_Code to reference LinkButton controls located in a MasterPage. I know how to reference the controls in the MasterPage from Content pages but I'm having a problem when moving all the code from the various Content pages into a class. The erroer // basi...more >>

add server controls to the templates for the DataList control.
Posted by Jon Paal at 3/18/2006 2:39:03 PM
how do I load controls to the templates for the DataList control. <asp:datalist id="dl1" runat="server" > <ItemTemplate> " how to load control(s) here ????" </ItemTemplate> </asp:datalist> ...more >>

Image in Designer (VS 2005)
Posted by Shawn B. at 3/18/2006 12:26:27 AM
Greetings, I'm creating a custom server control. In the design-time experience, I'd like to render an image where the control is placed. I have an /images folder in my website. The problem is, when I render the <img src=... tag during the design-time experience, nothing displays. When...more >>

Adding Controls to a Web Forms Page Programmatically
Posted by mark.norgate NO[at]SPAM gmail.com at 3/17/2006 8:33:44 AM
Hi I'm having some trouble adding a user control to my webform programmatically. I've done this before, but not for some time. The control was rather complex, but I created a new one consisting of an <asp:Label> control just so I can see what's going on. I'm creating and adding the user c...more >>

Control fails on dynamic load
Posted by Joel Reinford at 3/15/2006 6:05:04 PM
I have created a custom control by converting a user control as outlined in this MSDN article. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/customcontrolfromusercontrol.asp The custom control works correctly if I use it declaratively but fails if I use it pr...more >>

need help on application variables
Posted by AVL at 3/15/2006 4:11:26 AM
Hi, I need help on the usage of application variables... Can I populate application variables through my console application and use them in my web application.... Are application variables specific to web solutions only.. can anyone provide more info on this?...more >>

using properties
Posted by Jon Paal at 3/14/2006 12:13:50 PM
the primary use of a custom control is achieved with : "<cc1:myCustomControl id="CustomControl1" runat="server" />" properties are assigned programatically with a call to "LoadProperties(CustomControl1)" Sub LoadProperties(oThis) othis.Chart_align = "center" ... End Sub an...more >>

adding a custom vb.net winform control in asp.net
Posted by ElCapitan at 3/14/2006 6:51:54 AM
greetings all, I am new to adding controls to a webpage, i have created a control in vb.net and build the solution, I then took the dll file and stuck it in the root directory of the home page. I added this object tag to the body of the page <object id="simpleControl1" classid="http:Window...more >>

Custom controls / Toolbox / Visual studio 2005
Posted by Nick Stansbury at 3/14/2006 12:00:00 AM
Hi, Recently upgraded to VS 2005 from 2003. Started rebuilding an asp.net app from scratch. Not using projects (not sure at this point whether I like or hate this). I've finished redeveloping all of our custom controls (see below for the declareation). Our custom controls are in .vb files in...more >>

Webcontrol nulls values?
Posted by DrBytes at 3/13/2006 1:32:28 AM
Guys, I have a problem. I have an ASCX I created with listbox on it. this ascx also exposes a SortedList property called Values. THis property is read on CreateChildControls in the ascx and populates the listbox with it. I set the the Values property of the ascx in the OnLoad of the hostin...more >>

Making table cells available at design time
Posted by Christophe Peillet at 3/10/2006 12:49:27 PM
I have several custom UI controls that are table-based, and I would like to make some of the table cells available for users to edit at Design time, much in the same way the panel control works, for example. (I want users to be able to insert new controls, html code, etc.) If someone can p...more >>

Can ActiveX controls be built with C#
Posted by Leslie at 3/10/2006 11:25:17 AM
I would like to build a control that can be deployed from a web site that runs in IE. The component will have no user interface. It needs to collect information from the local workstation and either drop the information in a cookie which will be returned to the server or call the server direct...more >>

Determining the Browser and event.keyCode vs. event.which
Posted by Nathan Sokalski at 3/10/2006 12:38:44 AM
I am writing a piece of code for an ASP.NET function that generates an onKeyPress JavaScript eventhandler that uses the event.keyCode / event.which properties. I have two situations that I would appreciate any advice on: 1. I know that IE uses event.keyCode to get the key pressed. I have, howe...more >>

Creating my own Validation Control in ASP.NET 2.0
Posted by philjohn NO[at]SPAM gmail.com at 3/7/2006 10:53:45 AM
Hi there, I'm attempting to create my own Validation Web Server controls to perform 2 different field checks: * Number of words * Number of letters I've followed most of the tutorials out there on the subject and keep running into a brick wall with ASP.NET 2.0 - the client side validatio...more >>

Creating my own label control
Posted by Thom Anderson at 3/5/2006 8:26:42 PM
I need to enhance the label control by adding a small icon to the right that when clicked will run something for the user. How do I do this? I want the icon to have a mouse over (tool tip), a click event, some properties that I set in code, etc. Can someone tell me how to do this? ...more >>

VS2005 How to 'format' a long HTML Attribute
Posted by KCS at 3/4/2006 11:10:27 AM
Hi. I have a vs2005 custom web control. It uses a designer inherited from ControlDesigner. The designer writes an XML value as a string property into the control which the IDE inserts into the HTML source. Example: <myControl MyAttribute="<RootNode><SubNode> ... representing a potentially l...more >>

Designer: Collection of abstract objects
Posted by Joel G. at 3/3/2006 6:36:18 PM
Hiya folks, Does anybody know how to contain a list of abstract objects that is editable by the designer? For example, say I have the following: public abstract class Shapes: CollectionBase { public Shapes() { } public Shape this[ int index ] { get { return (Shape)base.Li...more >>

LoadPostData NullReferenceException
Posted by Jane Bell at 3/3/2006 12:53:22 PM
I have a webcontrol which renders a select | option html control. I have implemented IPostBackDataHandler with LoadPostData looking like this: public bool LoadPostData(string postDataKey, NameValueCollection postCollection) { string oldSelectedValue = SelectedValue; string newSelectedValu...more >>

using a control from within a control
Posted by Jon Paal at 3/2/2006 8:30:27 PM
I am developing a server control which will output some html and would like to have it also to return a bar chart image generated from this control: http://www.codeproject.com/aspnet/webchart.asp how can I call the bar chart control and have it return an image with my html ? ...more >>

learning composite controls
Posted by phil2phil at 3/2/2006 10:24:21 AM
Hi, Are there any good books somone can recommend that teach composite controls, and custom composite controls? I've seen some control books in c# but they usually have a small section or atmost one small chapter on it, is there a book just for this? Or one that atleast has a decent number of...more >>

Building a custom dialog look...
Posted by rlrcstr NO[at]SPAM newsgroups.nospam at 3/2/2006 8:30:41 AM
I want to build a control that alows a custom dialog border type of look. I'm implementing it now with a 3 x 3 table. Corner images and repeateable side images with all of the content in the center cell of the table. Pretty straigh forward, actually. I guess I need to know how to create a...more >>

Browse for file - on the server
Posted by David Thielen at 3/1/2006 8:05:27 PM
Hi; Is there a control where it can browse for a file on the server (not the client) and can do so using the permissions of the user on the client so it does not show shares/drives/directories/files that the user does not have rights to? I need it to return the fully qualified name of th...more >>

extended DataList VS 2003 says 'the active schema does not support
Posted by asapjim at 3/1/2006 3:21:39 PM
Hi, I have created a custom control for use in asp.net projects using vb.net and visual studio 2003. The control is working, however, on the HTML pane of the aspx page I am receiving red underlines on all of the template declarations with the message: the active schema does not support the e...more >>

UserControl ViewState with dynamic child controls
Posted by ejstembler at 3/1/2006 2:44:31 PM
I have a custom UserControl where the content is dynamically generated when the containing Page calls a certain method (i.e. DisplayData). The content of the UserControl is a dynamically generated Table with several Rows and several Cells. Some of the Cells contain a TextBox which the end-user ...more >>

Rendering Custom HTML in user Control
Posted by ASPboy at 3/1/2006 11:38:23 AM
I want to create my own html in user control, Is this possible or do i have to create a custom control for that situation. If it is possible in user control in which event do I have to implement the code and with which class to generate html is htmltextwriter appropriate? -Thanks ...more >>


DevelopmentNow Blog