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

Filter by week: 1 2 3 4 5

User Control and VS design time issues
Posted by Munish Sethi at 10/31/2003 1:31:47 PM
I have a User Control with a Code behind class. If the Code behind class inherits from UserControl class there are no problems within VS 2003, I can double click on the User Control (in VS 2003 solution explorer) and bring it up without getting any warnings in VS Design time environment. ...more >>


I know this is simple to do, but can't quite get it
Posted by Kevin Blakeley at 10/31/2003 10:01:06 AM
I am just starting to play around with creating server controls and I want to do something similar to the panel control. I want my control to output a Div tag and then based on the contents of what is put between the tags of my server control, I want to render that content in between my div. I ...more >>

Problems with asp:placeholder nested withing datalist
Posted by Chris Ericoli at 10/31/2003 5:21:54 AM
Hi, I am wanting to add a usercontrol programatically to a placeholder's control collection. The placeholder is coded within the ITEMTEMPLATE of a datalist. The problem that I am facing, is that when I render the page, the placeholder variable (that I have declared as per the ID of the placeh...more >>

CustomWebControl with client script
Posted by Lance at 10/30/2003 8:18:01 PM
Hello All. I have created my first custom web control to use client side script to move items from one list box to another (thanks Andy Smith for the inspiration even though I couldnt understand the C# code). The only way I could get the items in the boxes to persist accross postbacks ...more >>

Dynamic User Controls
Posted by AJ at 10/30/2003 8:25:47 AM
Hello, I have a page with user controls 1,2,3. 1-will always load in the page 2 or 3 will load depending on the action that is taken in 1. There are events/delegates in 1 that will tell 2 or 3 to load with data. The only way I'm accomplishing this now is I'm loading 2 and 3 on the pa...more >>

Problem with Eventhandling in user control
Posted by Franz Fitz at 10/30/2003 8:18:29 AM
Hi, I get really struggled, so it's my last chance to get some answers here. My problem is: I would like to create a web user control that is based on a XML structure. This XML structure is rendered thru a XSLT transformation on the server (this would seperate the logic fro the design, and so, ...more >>

User control problem
Posted by Niranjan at 10/30/2003 12:12:57 AM
Hi, I am having a user control (yesno) which shows "yes" and "no" options in a combo box. I have also set caching as 1 day for this user control. This control i am using in another user control (parent user control) for 5 times. I have properties to access individual controls. When I acc...more >>

How can I access the ProductName, ProductVersion, ExecutablePath, CompanyName from a ASP.NET Application in a Control?
Posted by IgorW at 10/29/2003 1:05:57 PM



Design-time rendering of User Control
Posted by PV at 10/29/2003 11:58:35 AM
Like many others, I would like to replace the default "grey button" display of my user control with something that more closely (better yet exactly) resembles the runtime display of the control. In an attempt to do just this, I created my own designer class for my "Header" user control. For n...more >>

Viewing custom web control at design time
Posted by D Wicker at 10/29/2003 9:00:38 AM
Hello, I've created a custom web control (composite) and added to my toolbox. I dragged the control onto a new web form and I see the small green box icon for the control but can't figure out how to see the entire control at design time. I have a Text property for the control and have set that ...more >>

Many user controls and only one form...
Posted by nfedin NO[at]SPAM programmer.net at 10/28/2003 12:04:34 PM
I am trying to develop a page template class that will enfore the layout of my site. I want to use a user control for left side navigation. When I try and add another user control in the body of the page, only the user control in the body gets executed. Both user controls have code behind cla...more >>

WebControl with derived propertied is not saving partial property in the HTML
Posted by c_zachariadis NO[at]SPAM hotmail.com at 10/28/2003 5:49:04 AM
Weird, here is a code example: If you make a brand new web control that has a property of type ITest2 and you create Test2 in there. Lets say I set both properties of Test2 to some string. When I flip to the HTML page I only see the property DestObject which is defined in ITest2 but I don't see ...more >>

DataGridColumn design editor
Posted by Giorgio Parmeggiani at 10/27/2003 2:15:35 PM
Hi I have created a datagrid custom inherited by the standard datagrid. Inside the datagrid I have defined a new type of column that inherits from DataGridColumn Is possible somehow to modify (even inheriting) in the designer of VS.NET the standard editor of th...more >>

DataGrid rendering inconsistant with other web controls
Posted by Peter Blum at 10/27/2003 1:57:31 PM
When a WebControl is set to Visible = false, the OnPreRender and Render methods are both skipped. (Control.PreRenderRecursiveInternal skips OnPreRender on children; Control.RenderControl skips Render on children.) DataGrid always calls the OnPreRender event, even when the control is contained ...more >>

I need help with .bat script
Posted by Lucas Cowald at 10/27/2003 2:00:01 AM
Hi, I have no idea how to write .bat scripts, can you help me write one? Here is a pseudo code of what I would like the .bat script do. For intFolder = 1 to 100 For intFileNumber = 1 to 20 IF intFileNumber.wmv file does not exist, THEN exit loop. sse45.exe -i k:\o\intFileN...more >>

Radio buttons/checkboxes
Posted by lmeacham at 10/24/2003 1:57:14 PM
Has anyone created a custom radio button or check box control that allows you to change the base image of the control so that it's not the microsoft standard circle and box? If so I'd love to hear about it! Thanks Lance...more >>

Two WebControls Same Page, big problems
Posted by brooksofsheffield NO[at]SPAM yahoo.com at 10/24/2003 12:19:59 PM
I have written a composite treeview webcontrol. It has a "Filtered" property. During the Render process, if the Filtered property is set to True it will add a checkbox, if the Filtered is set to False it should NOT add a checkbox. If I put just one instance of the webcontrol on a page, it wo...more >>

User Control Public Property Problem
Posted by Dan at 10/23/2003 2:01:41 PM
I have built a user control that displays the header on a web forms. It has a public property ("Msg") that I can set to display error messages from the main web form in a consistant way. In a very simple example I have a web form that has the header user control, a button, and a text bo...more >>

setting focus to textbox
Posted by Tony Piperato at 10/23/2003 1:45:19 PM
Hello, Can someone tell me if/how I can set the focus to a textbox so when the page loads the cursor is placed in the textbox and the user can just begin typing? Thanks. Pip ...more >>

Design Time Rendering Within Tables
Posted by James F. Kubecki at 10/23/2003 12:55:13 PM
Hello, I'm attempting to build a composite control which for purposes of layout renders its content as an HTML table row (<tr>). At runtime, it works just fine, but at design time, the control doesn't render at all. The following is a simplified example which will illustrate this: (CON...more >>

UserControl, Inheritance and the VS Designer
Posted by Travis Bolton at 10/23/2003 11:16:07 AM
I have a problem that seems like it should be simple (or not really a problem in the first place), that has become quite frustrating. I have a page that has several user controls on it. I am retrieving an object on the Web Form that each User Control will need. So instead of manually creatin...more >>

My Script to run a Command-Line from ASP does not work.
Posted by Lucas Cowald at 10/22/2003 11:43:39 PM
Hi, My Script to run a Command-Line from ASP does not work. No errors are returned either. It is on IIS. The directory where the script exists is on Drive I:, The executable .exe is on Drive D: Do you see any problems with the script below? Can you help me modify it? <% Dim objWSS ...more >>

How do you pass a DataBinder.Eval Container.DataItem to a functoin?
Posted by tittle NO[at]SPAM lennycat.com at 10/22/2003 4:36:44 PM
I'm trying to pass a value from a data repeater to a function in my code behind page. The value is a decimal that i want to show either in red or black if the number has a negative or positive value. This works just fine if I try <%redBlack(Convert.ToDecimal(23.5);%> But when I try to wrap ...more >>

Accessing custom control properties
Posted by Eric at 10/22/2003 3:11:39 PM
Hello, I've created a custom control and want to set properties in the aspx page. <%@ Page language="c#" Codebehind="test_control2.aspx.cs" AutoEventWireup="false" Inherits="oldtownclovis_dotnet.test_control2" %> <%@ Register TagPrefix="aspCustomerGrid" TagName="CustomerGrid" Src="test_u...more >>

User control code behind does not execute
Posted by Troy at 10/22/2003 12:11:43 PM
Anybody have any ideas as to why my user control code will not execute the server side code? I converted an .aspx page to an .ascx user control. The control displays but does not execute on the round trip. Thanks Troy...more >>

RUN/execute a Command-Line command from an ASP page
Posted by Lucas Cowald at 10/22/2003 4:14:52 AM
Hi, I need to RUN/execute a Command-Line command from an ASP page. This is the command: sse45.exe -i k:\o\2.wmv -o k:\o\2.shh -w 128 -df 0 -m 2 -p Can you show me a code how to run this command from an ASP page? I need to run it from an ASP/VBscript? Thank you very much for your help! ...more >>

Passing values between Custom controls?
Posted by arulrajalivi NO[at]SPAM hotmail.com at 10/21/2003 1:16:01 PM
Hello, Is there a way to pass a value between custom Controls? I created 2 custom Controls. Both of them render a HTML table.The First control's tablecell has the second control on it. The Second controls tablecell has a Button on it. Is there a way to read the value(Cell Value) of the sec...more >>

Saveing data from a web user control
Posted by Jack David at 10/20/2003 9:11:23 PM
I dynamically load a couple of controls into a page using a placeholder. A couple of the web user controls provide the ability for a user to select an item. The question is if I have a couple of controls on the same page how do I save the data from each control Thanks Jack David www.telasph...more >>

Save data from web user controls
Posted by Jack David at 10/20/2003 8:04:05 PM
I dynamically load a couple of controls into a page using a placeholder. A couple of the web user controls provide the ability for a user to select an item. The question is if I have a couple of controls on the same page how do I save the data from each control Thanks Jack David www.telasph...more >>

JavaScript and Custom Controls
Posted by arulrajalivi NO[at]SPAM hotmail.com at 10/20/2003 3:29:27 PM
Hi, I have a custom control(Child Control). Basically it renders a table. It contains a Button Control. During the Click event of the Button control I want to validate the User Inputs in the server side, if the validation fails I put the value into the Hidden Input control. Now, Onthe wind...more >>

Cross-application user controls?
Posted by mdelvecchio NO[at]SPAM visi.com at 10/20/2003 2:10:47 PM
Hi, I work in an environment where many developers work on serveral different web apps, each launched as a Virtual Directory webapp in IIS. The parent folder for all of these webapps is "/InetPub/wwwroot". I had hoped that it would be possible to create a "/controls" folder in wwwroot, and...more >>

Error on a user control.
Posted by Christopher Young at 10/20/2003 12:52:38 PM
Here is my error. I have tried something similar in a larger application I am working on and got similar results. Thanks for any help in advance. Server Error in '/WebApplication3' Application. ---------------------------------------------------------- ---------------------- Object refer...more >>

The file failed to load in the Web Form designer ... Unable to cast object of type myServicedComponentClass ...
Posted by Henry at 10/20/2003 12:01:28 PM
I have a user control that inherits from a base user control class. I can view and edit the base user control in the designer. However, my child user control fails to load in the web form designer. The error looks like this: The file failed to load in the Web Form designer. Please correct the ...more >>

Segregating designtime from runtime
Posted by General Chaud Caliente at 10/17/2003 4:45:21 PM
I am working on a .NET component library and I am trying to figure out how to segregate designtime code from the runtime assembly. Delphi made this easy. My natural inclination is to put all of the designtime source files into their own namespace and drop them into a sub-folder under the m...more >>

Design-time problem
Posted by stefano mostarda at 10/17/2003 12:45:36 PM
Hi there, I have 2 properties "P1" (enum) and "P2" (Color). When I set P1 I change the value of P2. Although the value of P2 is changed in the property window, when I switch to html view the value is not written in the control tag while the value of P1 is correctly written. Any Idea? ...more >>

No data coming back
Posted by Stanley at 10/17/2003 8:45:09 AM
Ok to see what was going on with my WYSIWYG control I decided to create a smaller control with just one simple textbox. The idea is to take in the text and write it out on the screen. Below is the server control and the ASPX page with its codebehind. I am still having a problem getting the postb...more >>

Custom server Controls event handling (Parent/Child)
Posted by arulrajalivi NO[at]SPAM hotmail.com at 10/17/2003 7:15:34 AM
Hi, Hello, I have a question regarding Custom server Controls event handling. The problem I am facing is, I have created 2 Controls say BrandContainer and FamilyContainer. 1. The FamilyConatiner renders a table with a Button Control on it. 2. The BrandContainer renders a table with a F...more >>

FIRST TIME - (he he)
Posted by news.microsoft.com at 10/16/2003 7:27:55 PM
Hi there, Yes it's my first time building ASP.NET controls. I need to add specific functinality to an Infragistics TreeView control. So I try to create my FilippoTreeView, inheriting from the Infragistics one. Please tell me if I am wrong. 1) First, you add to a new page your Infragistics con...more >>

Run Time Problem
Posted by stefano mostarda at 10/16/2003 5:51:53 PM
Hi there, I have a problem. I have a property "prop1" in my custom control. When I change this property automatically I change the value of another property "prop2". Than I change the value of "prop2" to whatever I want. The problem is that at run-time the set method of the "prop1" is auto...more >>

Implementing FontInfo
Posted by Gareth at 10/16/2003 3:48:20 PM
Can anyone tell me how to implement the Font (FontInfo) property in my custom control so that it appears as a property in the properties window? Thanks, Gareth ...more >>

page size...
Posted by Jim at 10/16/2003 10:13:34 AM
I have a pop window that is displayed and depending on the state of the system it will contain any number of user controls(ascx). These controls contain dynamic content and therefore the size of the control can change dynamically. Is it possible to work out the size of the page that is going t...more >>

Trouble with dynamically added controls
Posted by Daniel Walzenbach at 10/15/2003 10:39:59 PM
Hi everybody, I need to dynamically populate a webpage at runtime with controls. This = is the code I wrote. =20 Public Class WebForm1 Inherits System.Web.UI.Page =20 #Region " Vom Web Form Designer generierter Code " =20 'Dieser Aufruf ist f=FCr den Web Form-Designe...more >>

ASP.NET Drag Drop
Posted by Babu V.T at 10/15/2003 9:43:18 PM
Hi, I need to develop a ASP.NET web application having two tree controls.I should be able to drag tree nodes from one tree to another.How can i achieve it?Is there any component (freeware/shareware)that enables drag drop between two different trees....more >>

Multiple DataGrid in an ASPX page
Posted by Raja at 10/15/2003 9:46:17 AM
Hi, I have a requirement in which I need to display multiple datagrids in my ASPX page. I do not know how many of them until the page load. So I tried to approach this problem in the following ways but none worked. Method 1: Step 1. Create a custom web control with a datagrid in it. St...more >>

How to convert JPEG image into a binary data?
Posted by Lucas Cowald at 10/15/2003 1:51:05 AM
Hi, Using ASP and VBScript. How to convert JPEG image into a binary data? Is it possible with a command from ASP / VBScript without having to put it into a database first? I want to take the JPEG image from a folder, convert it into a binary data, and stream it to the browser. How can I do ...more >>

Need help with custom control....
Posted by cwarez NO[at]SPAM megsinet.net at 10/14/2003 1:15:01 PM
Hi, I have a custom server control that I created. There is a button on the control. When this button is clicked I need to popup a window with a new page(newpage.aspx). The new page needs to be a resource inside my custom control. My question is: Can I put an aspx page as a resource in...more >>

Control doesn't respond to Postback
Posted by Janaka at 10/14/2003 12:59:31 PM
I have a Custom Control which is used for searching on my site. I've made it a child of a PlaceHolder, which is contained within the server form tag. This uses client and server-side validation and both of these work correctly. The Page_Load event handles fine in my custom control but whenever...more >>

How can I use working Linkbuttons within a Web Custom Control?
Posted by Jan Limpens at 10/13/2003 11:20:20 PM
hi! I've got a Web Custom Control within which I'd like to use LinkButtons. This looks more ore less like this... protected override void Render(HtmlTextWriter output) { output.WriteLine(); output.WriteFullBeginTag("P"); LinkButton b = new LinkButton(); b.Text = "Bla"...more >>

.ascx UserControl Properties are set after Page_Load only on PostBacks
Posted by Douglas J. Badin at 10/13/2003 12:31:25 PM
I wanted to have a hierarchical DataGrid so I created a User Control that has a DataGrid to act as the Child Grid. I put it inside a pageable Parent Grid with a page size of one as below in Parent.aspx. <%@ Register Tagprefix="ABC" Tagname="ChildDataGrid" Src="ucChild.ascx" %> <ASP:DATAGRID...more >>

Preserving state of radio controls
Posted by Antonio Maciel at 10/13/2003 12:26:02 PM
Hi. One custom control I am creating generates a series of radio buttons. These are html radio buttons, not the server version. When I run the control the radio buttons are created ok, so I click one of them and refresh the page. The selected option disappears. How can I preserve the selection...more >>


DevelopmentNow Blog