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
May 2008
June 2008
all groups > asp.net building controls > february 2004

Filter by week: 1 2 3 4

Control added programmatically not firing event
Posted by Troy at 2/29/2004 12:21:08 PM
Hi, I'm loading a usercontrol with image buttons into a panel. When clicking the buttons the click event does not fire. Any suggestions Thanks Tro ...more >>


Custom TextBox with custom attributes and properties question
Posted by jtwright NO[at]SPAM tycovalves.com at 2/27/2004 3:50:12 PM
I have an webform that has a datarepeater on it. In that repeater I'm binding some data and I have put a textbox control in there. On the OnItemDataBound method of the repeater I have cast the controls collection index back to a textbox and added an attribute called "IsDirty" which is set to f...more >>

Name is not declared
Posted by DC Gringo at 2/27/2004 9:11:56 AM
I'm getting a BC30451: Name 'pageID' is not declared. I have a user control that contains a simple condition to display one row or another like: <% If x = 1 Then %> ....some html... <% Else %> ....some html... <% End If %> The control is used to in two different .aspx pages (e.g. first...more >>

Questions about embedded winControl
Posted by A Lonely Programmer at 2/27/2004 8:38:27 AM
Hi group, i have 2 questions i hope somebody can answer about a wincontrol being hosted in ie. 1. Is it possible to create a pop up that prompts for a user name and password when a button on my control is clicked? 2. Why are there no tooltips for controls in a wincontrol library project? ...more >>

accessing label in usercontrol from javascript
Posted by Fabrizio at 2/27/2004 3:46:08 AM
This is the scene: i have a user control IN a user control with a label inside named lblStato that must blink; i cannot use <BLINK> tag; having this in a webform a use this code Page.RegisterStartupScript("BlinkStatus", "<script>" _ & "setTimeout(BlinkStatusText,500);" _ ...more >>

XHTML and custom attributes
Posted by Peter Blum at 2/26/2004 6:08:11 PM
I'm planning my strategy to be XHTML ready for "Whidbey". My ASP.NET controls have a lot of client-side scripting. Sometimes I pass along custom attributes as data for my scripts to use. Those attributes appear in the normal HTML tag. For example: <input type=text attr1=value1 attr2=value2 /> (...more >>

UserControl in Template DataColumn
Posted by Alessandro Rossi at 2/26/2004 12:46:04 AM
Hi I developed a usercontrol with a textbox and an htmlInputHidden When I add my usercontrol in a webform, it works properly If I add my control in a template column of a datagrid i have some problems When I load the webform, the usercontrol has a UniqueID like this: "LookUp1:txtRisultato", then...more >>

Simple designer problem.
Posted by Max Metral at 2/25/2004 8:42:47 PM
I have a control that "wraps" some other controls, such as: <my:component property="value"/> <h1>HELLO WORLD!</h1> </my:component> In the designer, I want "<h1>HELLO WORLD!</h1>" to be rendered. What's the simplest way to accomplish this with no runtime impact? I tried variants of P...more >>



Problem with a DropDownList in a WebControl
Posted by Zürcher See at 2/25/2004 7:15:47 PM
I created a webcontrol with inside a dropdownlist, and exposed its proprieties DataSource,DataMember,DataTextField,DataValueField But I can't set the DataSource from the aspx page (DataSource='<%#this.DataSource%>' ). If I set a breakpoint inside the DataSet propriety, I see that the thread nev...more >>

User Controls
Posted by Mike at 2/25/2004 12:31:03 PM
In a test project, I have created two WebForms and one WebUserControl = that contains a textbox and a button. I would like to display a string = in the textbox when the WebForm1 is used, but another string when = WebForm2 is used. How can I do this? Do I have to create 2 different = classes an...more >>

Nested WebControls and intellisense
Posted by Zürcher See at 2/24/2004 6:29:21 PM
How I tell the intellisense which WebControls are allowed inside my WebControl? Like when I type <asp:table> it allows only the web control <asp:datarow> ...more >>

Controls events not firing
Posted by Mike at 2/24/2004 3:11:23 PM
Hi, I created a Main.aspx that contains a custom control, as follows: <body> <Sigma:pagebody id=3D"pdbTemplate" runat=3D"server" = templatepath=3D"Template.ascx" /> </body> The custom control "Template.ascx" uses other controls defined in = another project, as foll...more >>

Properties for User Controls loaded Programmatically
Posted by tklawsuc NO[at]SPAM hotmail.com at 2/24/2004 11:11:38 AM
I have x number of user controls that have a strong type (e.g. className uc1). I am able to access their properties through a single aspx page using: uc = LoadControl(path to control based on querystring value) textbox.Text = CType(uc, uc1).someproperty The thing I need to do though is to s...more >>

Aspx pages and webcontrols question
Posted by Pedro Jaraiz at 2/24/2004 2:11:05 AM
Hi, i have a newbie dud I would like to develop a portal, and i have two web controls (the left menu, and the top menu The only thing that i need its the central part (to show information depending in where you clicked in the menus What is the best way to make this...? For example... Its a g...more >>

how to pass parameters when "invoking" a control
Posted by v1nce at 2/24/2004 1:41:06 AM
Hi I'm looking for the -correct- (if any) way to pass parameters when invoking a control some kind o loadControl(path_of_control,"param1='1' param2='help me'") I really need this because we used a portal in which we can "plug" controls I got some "generic controls" and I want to specialize th...more >>

Drag and Drop
Posted by BenJ at 2/23/2004 6:08:46 PM
I am tring to implement Drag and Drop in my asp.net web-app, the idea is to allow a user to Drag and Drop an Object/Image to any location on a form (with a grid-background), and have the server store the usr selection. Is it possible to do this purely in asp.net? (no Java). Any example or link wo...more >>

winform in asp.net
Posted by Ken at 2/23/2004 1:31:08 PM
I am trying to do rich-client code hosted in Internet Explorer, formally referred to as ActiveX. I have a couple of examples for embedding a .net winform on an asp.net page. However, I seem unable to make any of these examples to work. The control just does not render, and I don’t get any errors ...more >>

Know in user control page_load if an user control event is going to be fired
Posted by Fabrizio at 2/23/2004 11:06:06 AM
Hi all, i have built a user control that shows a map and let the user zoom in, out, usual stuff. Putting this object in a webform the user can cause page postback without touching the user control, so in user control page_load i check if not ib_MapLoaded then LoadMap Unluckily with this logic ...more >>

RaisePostBackEvent not raised
Posted by Cristian Serban at 2/23/2004 10:06:12 AM
Hi, I have a little problem with function Public Sub RaisePostBackEvent(ByVal eventArgument As String) Implements System.Web.UI.IPostBackEventHandler.RaisePostBackEven I've created a lot of controls, for an appication i'm working on, and on some controls this function is not raised even if Me.Cl...more >>

Using User Controls in a Composite Control?
Posted by idzhugashvili NO[at]SPAM hotmail.com at 2/22/2004 8:55:50 PM
Is it possible to contain one or more User Controls (.ascx files) in a Composite Control? I start with a simple Composite Control sample that displays a plain CheckBox control that works fine, but when I switch this Checkbox with my User Control the page is displayed without my control. I ver...more >>

eVENThANDLER PROBLEM
Posted by J McD at 2/22/2004 5:16:06 PM
Hi I've added a column of ImageButtons to a datagrid and I want to run a method (OnImgBtnClick) when one is clicked. Using the code below, it seems that clicking on an ImageButton gets a postback but does not run the method. Can someone tell me what I'm missing Thanks in advance, J private v...more >>

Workflow in ASP.NET ?
Posted by Paul at 2/22/2004 9:52:38 AM
Hi. I asked this one before without any response, but I'll give it ago. In Commerce Server they have a pipeline editor which runs a series of components, the main drawback is that it doesnt support strong names or any web-interface programming, so changes need to be made from the admin uti...more >>

attaching client script to toolbar button control...
Posted by Ashish at 2/22/2004 1:09:01 AM
Hello, I am sick and tired of ochestrating server and client side scripts. Basically I am using toolbar from IE web controls and want to attach javascript to one of the buttons' click event. The problem is that button doesnt exposes attribute collection. I can attach javascript to whole toolbar...more >>

Control, UDP and IE
Posted by Thierry Lefevre at 2/21/2004 10:42:14 AM
Hi all, I have written a control in c# which heard an UDP port on a network broadcast address. In the other hand, a server send periodically (every 500ms) some messages to this broadcast address/port. (1) if the control runs on a winform, there is no problem. It displays the messages immedia...more >>

textboxes in dynamically loaded WUC not repopulated during PostBack
Posted by Craig Buchanan at 2/20/2004 10:03:42 AM
i am building a webform that dynamically loads one of two web usercontrols during the webform's page_load event. i am using label, named TabId, on the webform to persist which WUC should be loaded. during the postback i reload the appropriate web usercontrol based on the value in TabId. so far...more >>

Embedded winControl
Posted by A Lonely Programmer at 2/20/2004 7:27:56 AM
i asked this in another group, sorry for the cross post but i waited a week there the first time i asked an no answer. Can someone tell me is it at all possible to get a wincontrol embedded in an aspx page served over an intranet (lots of room to play around here) to list files on the users p...more >>

Refresh design time HTML on style change
Posted by TJoker .NET at 2/19/2004 11:27:20 PM
Hi, in my control I have some properties that are style objects (ex of type TableItemStyle) One example is below: private TableItemStyle _itemStyle; [ Category("Style"), Description("whatever...."), DesignerSerializationVisibility( DesignerSerializationVisibility.Con...more >>

Properties not visible in property browser
Posted by oskar NO[at]SPAM musiker.nu at 2/19/2004 6:23:10 AM
I have been trying for hours to get this thing working, but since I'm new to asp.net the solution may be simple. This is my problem: I have created a class that represents a custom web control which looks like this: Namespace WebControls Public Class TextField Inherits System...more >>

Tree View in ASP.net
Posted by Kals at 2/18/2004 7:11:04 AM
Hi, I want to develop a tree structure in ASP.net .The tree should be expandable with the child linking to some .aspx pages. How do i do it in asp.net? Any suggestions ?? Thanks kals...more >>

textbox value lost upon postback
Posted by Ashish at 2/17/2004 2:42:38 PM
Hi All, I have a server runnable textbox control. I also have a server side button object but I hook up javascript to it to show a modal dialog. Upon return it places the value in the textbox (client side script). The problem is that after it places the value, postback occurs and value is lost. ...more >>

Custom Control Width sometimes has a value...sometimes doesn't
Posted by paul reed at 2/17/2004 12:59:46 PM
Hello, My custom control is acting strangely. In my CreateChildControls method after creating my control, I wrap it in Div tags... with something like: Dim divStr As String = "<DIV STYLE=""overflow: auto; width: " & Me.Width.ToString & _ "; height: " &...more >>

Getting a subcontrol to work in a repeater
Posted by James Geurts at 2/16/2004 8:41:11 PM
Hi all I have a component that contains the following code <asp:repeater id="MyRepeater" Runat="server"><ItemTemplate><asp:HyperLink Text='<%# DataBinder.Eval(Container.DataItem, "Name")%>' NavigateUrl='<%# DataBinder.Eval(Container.DataItem, "Path")%>' runat="server"/><MyTag:MyControl Name='<%#...more >>

Hosted WINFormControl only works via LocalHost
Posted by Dave Brown at 2/14/2004 5:55:34 PM
Hi All, I have a winformcontrol which is loaded using the object tag in a html page which only appears when I load the page using localhost, if I used my machine name or www.mysite.net which is also linked to 127.0.0.1 in my hosts file the page does not appear, The control has a strong name. I...more >>

Custom Server Control can't hold modified status
Posted by ton at 2/13/2004 4:07:49 PM
My custom control changes form, depending on the clicks. Ik save the status, and I can see that this occurs. So when I Show at the beginning 10 fields, which includes a field which is a foreign key to another record in another table. Pressing on the linkbutton "changes the behaviour of the contr...more >>

Dynamically Building Property Values for Designer
Posted by paul reed at 2/13/2004 1:47:24 PM
Hello, I would like to source a property for my custom web control from a database. I see examples out there that are sourced from an enum, but that is hardcoded and this I needs to load dynamically. Is it as simples as having a property that returns and ArrayList loaded with those property va...more >>

Design time support for classes derived from DataGridColumn
Posted by Antonio Bakula at 2/12/2004 9:32:45 PM
How to get design time support for classes derived from DataGridColumn ? I have created new DataGridColumn type, it uses image from database as source and renders actual image, not just some link to image somewhere. Now my column is working pretty good but I can't get design time support in ...more >>

ASP.NET Forums beta search hide feature!!??!?!?
Posted by gicio NO[at]SPAM gmx.de at 2/12/2004 4:02:33 PM
Hi!! can someone tell me where I can find some information to get this cool feature to hidde text as it's used in the ASP.NET Forums beta search ??? for example here: http://www.asp.net/Forums/Search/SearchResults.aspx?q=development and click on "Re: N-tier development questions : Inhe...more >>

Overwriting the "href='javascript:__doPostBack........" in a LinkButton
Posted by jeffkretz NO[at]SPAM hotmail.com at 2/12/2004 2:18:28 PM
I'm building a custom LinkButton control that will confirm a deletion before processing it. I've tried a few different things, some partially successful, and I did find someone who had a script that does this (though I didn't like the implementation so I'm still trying). I'm wondering if th...more >>

How to use embedded image in ASP.NET Server Control
Posted by odegnan NO[at]SPAM dmghost.com at 2/12/2004 12:42:20 PM
I have a server control, written in ASP.NET, where I added two images as "Embedded Resource" to it. Now, I need to find a way to read the resource and produce an output stream to have the image be displayed on the web page as a regular image HTML tag such as "<img src='myResourceImage.gif'>". ...more >>

Create Graphics in Custom Control
Posted by Stanley at 2/12/2004 10:11:43 AM
Is is possible to create a graphic using GDI+ and send it back from a control doing something like: [code] Protected Overrides Sub Render(ByVal output As System.Web.UI.HtmlTextWriter) ' Set the content type HttpContext.Current.Response.ContentType = "image/jpeg" Dim b As Bitmap = BuildImage() ...more >>

User Control needs to refer to Page
Posted by Joe Fallon at 2/12/2004 8:37:04 AM
I have a user control which can appear on many pages. The control needs to know which page it is on so it can render itself correctly. What is the best way for the control to find out what page is being requested? Code snippet would be great. Thanks! -- Joe Fallon ...more >>

Can't get TagPrefix to work for custom Web control
Posted by Michael Skelton at 2/11/2004 7:56:05 PM
Hi I've created a new custom Web control. I have tried to customize the assembly attribute TagPrefix . However, each time I drag my custom control onto a form, it's TagPrefix is still "cc1". What am I missing here My control is nested within two namespaces: for example, OuterNamespace and InnerN...more >>

Interactive use of my webcontrol
Posted by ton at 2/11/2004 4:56:05 PM
Hi, I've developed (trying) to custom server web controls: 1) A list which shows in a table several rows from a database table. The firts column has a button, which is meant to be clicked by the user to get to edit the record. 2) The second control, also a composite control, is a recordcard, wh...more >>

Events and Delegates
Posted by Michael Morse at 2/11/2004 2:34:55 PM
How in a asp.net web form can you have two different objects events call the same sub with different signatures. Example: I have 1 ImageButton control and 1 LinkButton Sub HandleTheEvent(ByVal sender as object, Byval e as eventArgs) 'blah End Sub By doing AddHandler ImageButton1.Cl...more >>

Custom Control has no Scroll bars
Posted by paul reed at 2/11/2004 12:51:58 PM
Hello, I have a custom composite control that has a tree view inside. However, at run time, as I begin to click and expand parent nodes, no scroll bars appear when the nodes expand beyond the size of the control as it was placed on the page. This causes the entire aspx page to get a scroll bar...more >>

Can I open a web form from another page
Posted by ton at 2/11/2004 11:51:45 AM
Hi, I would like to open a webform based on the event fired from a customservercontrol. The webpage is not fixed. I have to set some variable. I tried: Private Sub DbWebCard1_ShowCard(ByVal id As Integer) Handles DbWebCard1.ShowCard Dim xx As New WebForm3, card As New dbWebCtl.dbWebCard c...more >>

A DotNet Severe Limitation ?
Posted by Dave Brown at 2/11/2004 11:41:13 AM
I believe I have found a severe limitation of DotNet, with respect to hosting Windows Form Controls in WebPages. It appears this is only possible when the web is configured on Port 80. Any other port and the control will not display. After a couple of days of searching the newsgroups/various for...more >>

Can't Resize Custom Control
Posted by paul reed at 2/10/2004 9:29:42 PM
Hello, I have a web custom control that is a tree view. Once I place this control on my aspx page, I am not able to resize it. The ancors are fixed. It uses a designer that I got help with on this newsgroup, but I don't see why this would prevent me from resizing the control. I confirmed th...more >>

Is it possible to keep the size of a control within a panel
Posted by ton at 2/10/2004 6:18:02 PM
If I add a panel to a webform, put wrap=false I expect that adding a customservercontrol within this form it will not go out of the border, but I also hoped it would not become bigger. The panel just fits around the control, i hoped to get scrollbars in stead How can I achieve this Ton ...more >>

How to set the with of a textbox so it fits exactly
Posted by ton at 2/10/2004 6:10:42 PM
In my composite control I use a table object with cell and row objects. A Textbox is added to this control. How can I set the width of the textbox so it fits. If I set a to high value, the table is much to wide, if it is to short, the textfield will scroll in the tablecell, and it is not nice to ...more >>


DevelopmentNow Blog