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 > july 2004

Filter by week: 1 2 3 4 5

Alerting the user from code behind
Posted by Peter Aitken at 7/31/2004 1:53:16 PM
I need to alert the user when code behind in a user control encounters certain data conditions. I'd like to do this with a MsgBox but I know that code behind cannot call this function, at least not directly. Is there a way to do this? -- Peter Aitken Remove the crap from my email address ...more >>

Having trouble adding a web user control programatically.
Posted by Shawn at 7/31/2004 6:19:01 AM
Hi All; I am attempting to figure out how to add a user created control (test.ascx) to an ASP.NET page based on a user choice. I have created a simple page that uses session to keep track of the instantiated class. i have added to the class a simple public property (action) initially set to zero....more >>

Repost: Getting Project Folder during Design Time
Posted by johndoe NO[at]SPAM driver.net at 7/31/2004 3:46:04 AM
I was given the following code in response to a request to retrieving the Web Root for a Project while at design time. However this does not do what I need it to do. I am looking for the Current Project (which i assume is objProject) and I am looking for its "Project Folder" ? The Solution ...more >>

Bubbling Event in Composite controls
Posted by nidhee NO[at]SPAM gmail.com at 7/31/2004 2:02:55 AM
Hi Everyone, I am building a composite server control. I have defined an event for my child control with Custom Event Arguments. I am using the bubbling method to access the child control's events in the Parent control. Still, my child control is not raising the event. What am I missing? Fo...more >>

Property Group issues
Posted by Earl Bonovich at 7/30/2004 3:15:38 PM
I have created a composite custom control. It works fine, renders, all is good on that side. I am trying to cleaup the design mode side of it, and in turn clean up the core control. All surounding properties. I have been able to create classes for the properties. I have been able to get th...more >>

File upload. Huge files
Posted by Oleg Slyusarchuk at 7/29/2004 3:07:20 PM
Hi, This is topic that has been discussed thousand times, however. Classic approach is to use HttpPostedFile object, check if it's not null, and save it. Something like: // Check to see if file was uploaded if( filMyFile.PostedFile != null ){ // Get a reference to PostedFile object HttpP...more >>

call javascript function after validation
Posted by Eirik Eldorsen at 7/29/2004 1:27:22 PM
When the user clicks a button on my page, a server side operation starts which takes several seconds to complete. To make the user less impatient I want to show a animating gif when he/she clicks the button. I've been able to do this by calling a function by using the onclick event of the button...more >>

Thread: Control Overrides Page
Posted by Reiner Max at 7/29/2004 11:52:19 AM
Hello I would like to be able that my control overrides the complete live circle of the page. The event is trigger by a Query string value. I need that my controls stops the process(events) of the page and all the other controls. The Problem for me is that i can overwrite the render m...more >>



HtmlTextWriterAttribute for double click attribute
Posted by whoisnidhee NO[at]SPAM yahoo.com at 7/29/2004 6:11:31 AM
Hi Everyone, I am building a server control. I am using the HtmlTextWriterAttribute class for adding the attributes to the control. I want to add a function on the "double click" event. The HtmlTextWriterAttribute does not provide the ondoubleclick event. How can I add this attribute to my cl...more >>

How to set button text Align to left?
Posted by boy0612 at 7/29/2004 1:43:48 AM
How to set button.text Align to left? ...more >>

Naming container
Posted by Jonas Auken at 7/28/2004 4:25:09 PM
I'm having a problem with a linkbutton which is not assigned a UniqueID with all the prefixes for some reason. The linkbutton resides in a UserControl but is used within a custom control; both controls implement the INamingContainer. The strangest thing is, when I click this linkbutton on a ...more >>

Web Custom Control error on ID field
Posted by Steve Mauldin at 7/28/2004 10:32:13 AM
I get the following error when trying to view in browser an aspx page that has my simple Web Custom Control. If I remove the ID=Controlname from the ASPX then the page and control displays correctly but I need to have id fields to reference my web custom controls in code behind. Can someone tell...more >>

Thanks
Posted by Jay at 7/28/2004 6:21:08 AM
John, I actually figured out what I need to do in the render method and that = is call the method Add AttributesToRender. This will add to any element = (in my case table) all the attributes that have been set in the = properties window. You can also override that method and add additional =...more >>

Composite control with dynamic controls depending on a property value
Posted by Matt Sollars at 7/27/2004 5:17:51 PM
Hi, all. I am really stuck here. I've written a few composite controls before and fully understand the "typical" scenarios. However, this one is far different. I understand that CreateChildControls must create the controls in exactly the same way as it did before a post-back in order for everyth...more >>

Passing some info to a control at runtime.
Posted by Simon Harvey at 7/27/2004 4:13:08 PM
Hi all, I've made a user control and I need to pass it some information so it knows what it should display. Can anyone tell me what i need to do to pass it information via html attributes. eg: <asp:mycontrol myproperty="true" runat="server"></asp:mycontrol> I know I can pass it informatio...more >>

FORM wrapping
Posted by foobar NO[at]SPAM centrum.cz at 7/27/2004 12:45:13 AM
We're migrating a website to the Content Mgmt Server 2002. I've noticed all the pages look like so: <body> <form> ... ... </form> </body> Call me a purist if you will, but I do care about HTML semantics. For instance, a press release is not a form. Question: Is it po...more >>

Can a control produce html?
Posted by Adam Smith at 7/26/2004 2:31:08 PM
Hi, Hopefully someones come across this... I've a page that dynamically generates some content. Part of this is a series of user controls. _______ |___x___| |___x___| |___x___| |___x___| fig1 x: these are user controls Now... if I do a view source, all I get is the table that hous...more >>

How to retrieve values of dynamically added web controls on the form??
Posted by Aruna Bajpayee at 7/26/2004 9:07:59 AM
Hi, I have created a survey form in asp.net that has dynamically generated fields( based on the record that I get from the DB I adding a text box or a dropdown to the form). My problem is, how do I get the values of the text box or dropdown list to save in the DB after user has filled the surve...more >>

retrieve value of dynamic web control
Posted by Aruna Bajpayee at 7/26/2004 9:07:54 AM
Hi, I have created a survey form in asp.net that has dynamically generated fields( based on the record that I get from the DB I adding a text box or a dropdown to the form). My problem is, how do I get the values of the text box or dropdown list to save in the DB after user has filled the surve...more >>

Inheriting style and properties
Posted by Jay at 7/25/2004 11:49:02 PM
I have subclassed RadioButtonList to add the mouseover and mouseout = events to individual options. As far as I can see I have to totally = rewrite the render method. The way I did it I have not included any = inherited styles and properties. How do I inherit the styles and = properties that h...more >>

Saving selectedIndex state for subclass of RadioButtonList
Posted by Jay at 7/25/2004 9:37:10 PM
I am new to building custom controls. I have subclassed RadioButtonList = to provide a rollover effect where I can provide details on each option. = I am having trouble saving the state of the selectedIndex. When I post = back the currently selected option is lost. I am digging into various =...more >>

Msgbox in User COntrol
Posted by Peter Aitken at 7/24/2004 11:15:39 AM
I have created a user control with an event procedure for a button in the code behind module. Code in this procedure uses the MsgBox function to display a message to the user - but whenever it is called I get an error "It is invalid to show a modal dialog or form when the application is not ru...more >>

Possible to create a composite control that has a child control that is a validator that validates the composite control itself?
Posted by Jonathan Eric Miller at 7/22/2004 5:34:21 PM
I am attempting to create a composite control which has a label, followed by an optional error message, followed by two text boxes. I have everything working except the optional error message part of it. The optional error message is a validator that references the composite control itself. I'm ...more >>

ITeamplate : parsing children ?
Posted by Julien at 7/22/2004 2:14:01 AM
Hi I'm working on a UserControl which contains all the design html code with placeholders. Then i instanciate the ITemplates in the placeholders. I have the following code: <uc1:page id="Layout1" runat="server"> <HeaderTemplate> </HeaderTemplate> ...more >>

viewstate
Posted by dsoltesz at 7/21/2004 10:06:02 AM
I have a custom web control and i'm using viewstate for some properites. I add the control to a page, set some properties and then try to render those property values from viewstate to the page but I always get nothing and 0 as whats being rendered..any ideas why viewstate is not return anything...more >>

Handling Nulls in Databinder.Eval
Posted by Jordan at 7/20/2004 4:26:37 PM
I had a problem, now it's fixed, and now I have a concern on why isn't there a better way. The question is: How do you handle NULLs in your control based on the syntax: <%# DataBinder.Eval(Container.DataItem, "myfield") %> Now coincidentally, this problem came up when I was calling a custom ...more >>

Getting Current Project Loaded
Posted by johndoe NO[at]SPAM driver.net at 7/17/2004 1:27:58 PM
I am building an ASP.NET Custom Web Control and I am wondering if there is any standard method when implementing ControlDesigner for a Class to determine what directory the project that that the Web Page that the control has been embedded into is in while at Design Time. so that if My...more >>

iewebcontrols setup
Posted by Schoo at 7/15/2004 9:05:29 AM
I am developing an asp.net app (VB backend) using the treeview in iewebcontrols.exe. I have it working fine on my development workstation and I have a development server that runs it fine. The trick seems to be the production server. I have run through all the steps in the readme.txt for the ...more >>

ImageAlign not available for ImageButtons
Posted by Jordan at 7/14/2004 4:07:41 PM
I'm creating dynamic imagebuttons but can't set the ImageAlign attribute. Any reason why it's not allowed? j ...more >>

Control Removing contents when editing properties
Posted by MattC at 7/14/2004 3:10:25 PM
I have a custom control, that I add via the HTML view of my aspx page. I then also manually added a datagrid as a child control. <mycontrol:tagname runat=server id=foo> <asp:datagrid runat=server id=foobar></asp:datagrid> </mycontrol:tagname> When I switch to design mode and edit the c...more >>

Customdesigner
Posted by richie_hackett NO[at]SPAM hotmail.com at 7/14/2004 1:17:51 PM
Hi, I'm trying to write a web control which is basically a calendar control(need to add extra functionality later) I have the first phase working eg a calendar control is rendered and works as expected but because I inherit webcontrol not Calendar I don't get the properties for it in the VS de...more >>

How to Implement an Custom Image Control
Posted by Reiner Max at 7/14/2004 11:35:35 AM
Hello As i know images must be return as an aspx page in the src attribute from the img tag. But what is the best strategy to build a Custom Control with Desing Time Support. Regards Max...more >>

Isn't DataGrid.Render(writer) supposed to automatically call RenderBeginTag(writer) and RenderEndTag(writer)?
Posted by Henri at 7/13/2004 8:53:09 PM
Hi, I'm trying to customize a DataGrid adding custom rows before the endTag </TABLE>, and also some html before and after the control itself. So I wrote : '************************************************************ Protected Overrides Sub Render(ByVal writer As HtmlTextWriter) write...more >>

Child user control accessing parent properties
Posted by Michael at 7/13/2004 1:40:18 PM
We have a user control (Titlebar) that loads other user controls (children) into itself based on a property set in the HTML: <fss:Titlebar id="empStmtListing" runat="server" UserControl="StatementListing.ascx" Width="90" HelpId="1" ListingType="3"></fss:Titlebar> Some of the children u...more >>

Custom Control won't appear in design mode?
Posted by Dave at 7/12/2004 7:14:01 PM
Hi, I created a custom control, regisitered it at the top of the page, and it works fine. However, it doesn't appear on the page during design mode as I've seen other controls or event ASP.NET controls (i.e PlaceHolder) as listed below DESIGN MODE: [ControlClass "ControlClass ID"] or [Pl...more >>

Creating a Custom Color Property list
Posted by Martin Dobson at 7/12/2004 4:13:02 AM
Basically I can't figure out for the life of me how to display a custom list of colors in the property window. I have a property called ForeColor() which I want to use a custom list of colors which I have built as a structure. I mimiced the design of system.drawing.color to do this but it doesn't wo...more >>

nested custom control
Posted by yanivya NO[at]SPAM cellcom.co.il at 7/11/2004 7:26:49 AM
Hi all, I have built a custom control (X) which has to be place in another custom control (Y). I have created a collection of (X) controls in (Y) c'tor. The result of (Y) Render method don't take the Render of (X), so for now all rendered HTML transfered only from (Y) control. How can I impl...more >>

What is .net
Posted by Midnight Java Junkie at 7/10/2004 4:40:37 AM
Dear Colleagues: I feel that the dumbest questions are those that are never asked. I have been given the opportunity to get into .NET. Our organization has a subscription with Microsoft that basically entitled to us to just about every .Net development tool you can imagine. I cant even begi...more >>

TreeControl recommendation?
Posted by Phil Wright at 7/9/2004 1:28:45 PM
I am starting work on my first ASP.NET project. I need a tree control that has the same look and feel as the standard windows one. It must be able to show images along with the node text and be single select. I also need to have the ability to show a context menu when the user right clicks a t...more >>

TypeConverter HELP Needed!
Posted by ME at 7/9/2004 6:38:50 AM
Ok, I have a property called ControlType. The property is of type 'Type'. It stores just the type of control a user selected. I am really confused how I would implement a converter on this type of property since all I need returned is the Type of control being referenced and not the control its...more >>

Any way to avoid mass conversion of #INCLUDE files to UserControls?
Posted by johna NO[at]SPAM cbmiweb.com at 7/8/2004 10:56:39 AM
I have a very large classic ASP site that is making heavy use of server-side #INCLUDE of .ASP files within .ASP files. I've researched and seen recommendations describing how you can convert all files to be included to user controls and then change all including files to use "register directives...more >>

custom control with inner 'gridlayout'
Posted by Robert Wallström at 7/7/2004 8:47:27 PM
Hi everyone.. I am trying to biuld a control wich should have simulare behavior as htmlcontrols.htmlgenericcontrol, buy that I ment to get the inner part of my control to be gridlayout enabled. I know howto make this posible in runtime, BUT how do one make this possible in design-time? To...more >>

Radiobuttonlist and cssclass
Posted by news NO[at]SPAM besty.org at 7/6/2004 7:29:01 AM
I am in the process of updating old asp projects into asp.net. We used to have radiobuttons which had an attached css class as follows: <label for="q2a1">High<input id = "q2a1" class = "radio" type="radio" name="q2a" value="1"></label> with the corresponding css class: ..radio {height:...more >>

Can a webcontrol (webcontrol.dll) have a configuration file?
Posted by Luis Ramírez. at 7/5/2004 12:07:01 PM
Hello everybody: I would like to know if a webcontrol (webcontrol.dll) can have a configuration file (webcontrol.dll.config)? I have done some tests and I found the config file (webcontrol.dll.config) is never examinated. Thanks in advance. Luis Ramirez. ...more >>

Composite webcontrol and postback
Posted by George Ionescu at 7/5/2004 10:23:54 AM
Hello all, while trying to develop a composite webcontrol (which has, among other things two textboxes and no submit buttons) I've faced the following problem: how can I read webcontrol's texboxes values, how can it pass data posted from the client (the post is done with a command button on...more >>

manage properties in PropertiesWindow
Posted by arg at 7/5/2004 6:42:01 AM
For example I have properties: b1 bool; b2 bool; [Browsable(true),Category("Test")] public bool B1 {get{return b1;} set{b1 = value;}} [Browsable(true),Category("Test")] public bool B2 {get{return b2;} set{b2 = value;}} How I can make B2 read-only or invisible in Properties Windo...more >>

Composite Control Property Setting Problem
Posted by Alphonse Giambrone at 7/3/2004 4:51:40 PM
I have built a simple composite control that consists of a textbox, requiredfieldvalidator and rangevalidator. For properties that are unique to the individual control, I set/get them directly from the control as follows: [Description("The text value"), Bindable(true), Browsable(true),...more >>

MustInherit base class inherited by UserControl
Posted by Craig Edmunds via .NET 247 at 7/3/2004 7:51:39 AM
Following on from this discussion http://www.dotnet247.com/247reference/msgs/29/146830.aspx i'm having the same problem, the classes that i think should work but are throwing up the "type abstract" error are: ######################################## base class: ###########################...more >>

Parser Errors with VS.NET
Posted by Adam Smith at 7/2/2004 4:09:01 PM
Firstly I appologise for the cross post, I've discovered more information which pinpoints VS.NET 2003 as the problem. The issue: I'm trying to create a server control, after failure I'm trying some simplistic controls to build from I'm using the following code: SimpleControl.cs --------...more >>

User Controls Inherited from a Custom Control share variables?
Posted by Yuri Vanzine at 7/2/2004 6:06:02 AM
I have a Custom Control that I inherit from a User Control like this: public class SecureUserControl : UserControl, INamingContainer it maintains a few control states like visible, readonly relying on security settings. I override CreateChildControls() similar to how you woud handle a custo...more >>


DevelopmentNow Blog