ASPFriends.com 'aspngcontrolscs' list Archive - February 2002
Messages
Page: 12
VS.NET Property Set/Get for Object Property (4 replies)
ASPFriends.com 'aspngcontrolscs' list
How would I get the property box in VS.NET to read/edit this property of a control? protected LiteralControl SeparatorHtml { get { EnsureChildControls(); // At design time, EnsureChildControls is not executed if( separatorHtml ! null) return separatorHtml; else return new LiteralControl(""); } set { EnsureChildControls(); separatorHtml value; } } Thanks, Steve
wiring up a validator in code (5 replies, VIP)
ASPFriends.com 'aspngcontrolscs' list
I have a composite control in which I would like to add a validator. I'm getting the following error when I access the page: Unable to find control id myLeaseTabs:ctrl9:ctrl2:ctrl3:myLeaseTabs:ctrl9:ctrl2:ctrl3:ctrl2 referenced by the 'ControlToValidate' property of . This control may be buired several levels deep in other controls. thanks, Here is my control: public class EztTextBox : Control, IN...
ViewState restores incorrectly (3 replies)
ASPFriends.com 'aspngcontrolscs' list
I have a composite control (A) which contains a number of composite controls (B). B consists of a DropDownList and 3 PlaceHolders. The PlaceHolders are populated with server controls based on the SelectedIndex of the DropDownList. The problem I'm having is this... say I choose an item in the DropDownList, the PlaceHolders are populated accordingly which is great. Ok now say I chose the wrong item ...
Fix for StupidDesignTimeProblemThatVexedMeForMonths! (4 replies)
ASPFriends.com 'aspngcontrolscs' list
As a general FYI/FAQ for anybody who is planning on adding design time support for your custom controls... Do NOT use HttpContext.Current.Trace(), or anything else that uses HttpContext.Current, because it is null in the designer. If you are going to include tracing in your control, I recommend you take the following steps: 1) Use your own function, and place it in a Conditional("Debug") block 2) ...
State (2 replies)
ASPFriends.com 'aspngcontrolscs' list
If I set a control property in Page Load, I would expect that property value to be set within the control whether the page is in Postback, or not. However it seems that if I do this in Page Load: myControl.Flag true; // where the default property value is false ... I find that the value is true when the page is first shown, but false in postbacks. i.e. even though the above statement is not within...
IPostBackDataHandler (19 replies)
ASPFriends.com 'aspngcontrolscs' list
I have a control that implements IPostBackDataHandler. It then implements the two methods required by that interface, namely: public virtual bool LoadPostData(string postDataKey, NameValueCollection values) and public virtual void RaisePostDataChangedEvent() The control builds fine, however on causing a postback LoadPostData is not called. I placed a trace in LoadPostData() and no trace output app...
Tag prefixes and control distribution (2 replies)
ASPFriends.com 'aspngcontrolscs' list
After discussing it with a few people, I've decided to distribute my controls each in their own dll, to ease versioning issues. While I don't really like the dll explosion that that creates, my main problem is the change in tag prefix behavior. When all my controls were in the same project and compiled to the same dll, I could have them all use the same tag prefix. But now that they all have their...
Implementing OnDataBinding efficiently (4 replies, VIP)
ASPFriends.com 'aspngcontrolscs' list
How does one properly implement the OnDataBinding Event most efficiently in a custom server control which has these properties: DataSource DataMember ... I'm asking because the DataSource Property is of type Object and when somebody binds to the control, it could be an Arraylist, a DataTable, a DataSet and who knows what else not. I've looked, but only found examples that deal with simple lists an...
Toolbox Icon sans VS.net (3 replies, VIP)
ASPFriends.com 'aspngcontrolscs' list
I've asked this before, but i'll ask again... can ANYBODY tell me how to make a server control have a toolbox con without using VStudio.net? I am well aware of how to do it with VS.net, but I need to know how to do it from the command line. Andy Smith Chief Code Monkey
proper base class for a composite control (2 replies)
ASPFriends.com 'aspngcontrolscs' list
I just wanted to to get the Best Practice for which Control to subclass when creating a composite control which has no UI. If the control is only going to be a container for other, known controls, with no templates or databinding or anything, what is the right one? Control? PlaceHolder? UserControl? It seems to me the logical choice, judging by the name, is PlaceHolder. Does it implelement INaming...
Debugging a custom control designer (3 replies)
ASPFriends.com 'aspngcontrolscs' list
I'm creating a custom control which doesn't seem to be behaving itself within the designer.... Would anyone be able to point me in the direction of some documentation on how you go about debugging web custom controls ? Or be able to give some insight into techniques you have found useful ? In particular I'd like to know the easiest way to view the html displayed output to the designer window.... I...
Control install question (5 replies)
ASPFriends.com 'aspngcontrolscs' list
I'm trying to make the Xmleditgrid control work from the asp.net contol gllery. I don't know exactly what to do to install it. Do I have to compile the .cs file and then put it in the /bin directory? If so, why didn't they just make the compiled file available? What are the other files for that are included in the Xmleditgrid download? Randall Moore
MapPath at Design time... (3 replies, VIP)
ASPFriends.com 'aspngcontrolscs' list
I'd like to get access a file on the server at from a designer at design time. To do this I need either a URL for the current web application or to be able to map a path to a file under the current web application.... I've attempted to use System.Web.UI.Control.MapPathSecure and the control's Page.MapPath property neither seem to want to play ball at design time. When either method is called I get...
adding controls (2 replies)
ASPFriends.com 'aspngcontrolscs' list
Hi, I am trying to add a dropdownlist to a datagrid in the cell where the pager resides to add a pagesize select option. I add this control when the datagrid is created in the Item Created method. As I cant set the properties declaritively I do so in the Item Created method but cant set the event handler e.g. I cant do ddl.SelectedIndexChange "Index Changed". Any suggestions, thank you. public voi...
Moment 22 with Composite Controls (3 replies)
ASPFriends.com 'aspngcontrolscs' list
Problem with child controls If I implement the INamingContainer interface the the OnBubbleEvent methos works but the LoadPostData method is not called. On the other hand if I don't implement the INamingContainer interface then the LoadPostData method is called but OnBubbleEvent stops working. Could somebody shed some light on this before I go crayzy. Rolf Tollerud
Server Control Designer persitence problem (5 replies)
ASPFriends.com 'aspngcontrolscs' list
Mornin', y'all: I have written a server control & designer. What I'd like to happen is when the DesignerVerb "AddTab" is clicked, the property will change. So far, so good. Then, when the project is saved and reopened, the property hasn't saved. The property isn't writing to the .aspx page. What am I missing? I'm including the full code (with only extra properties stripped out) as I don't know whe...
How to persist 2 properties of a control? (7 replies)
ASPFriends.com 'aspngcontrolscs' list
Hi guys, I have the following problem I want to make a custom INPUT type text tag with a custom property UnderlyingValue besides the Value property. This means that the control should be assigned 2 values the ItemID for example for the Underlying value and the ItemName for the Value. The two values will be assigned CLIENTSIDE, and I want to get them AT THE SERVER. ViewState, hidden second INPUT or...
control 2 webcontrol (3 replies)
ASPFriends.com 'aspngcontrolscs' list
Hey I have a control instance(System.Web.UI.Control), which is of type: System.Web.UI.WebControls.DropDownList (using the ToString function). How can I get to the member functions of the DropDownList class instead of the methods of the Control class? thanx in advance
Passing Values to User Control (2 replies, VIP)
ASPFriends.com 'aspngcontrolscs' list
Moved from [aspngfreeforall] to [aspngcontrolscs] by Plip phil.winstanley@creations group.com I'm trying to pass values to a User Control, but don't seem to be getting anywhere. I have a user control called SponsorList.ascx that is displayed on a couple of pages on my site. SponsorList.ascx has a label in it that displays info from a database that is retrieved by the code behind page SponsorList.a...
Inheriting DataGrid class for Custom Render (2 replies)
ASPFriends.com 'aspngcontrolscs' list
I am interested in using a datagrid control but I want to render the grid as transposed, that is the rows are now columns and vice versa. I assume I just need to override the Render method, but I'm not sure how to utilize the databinding objects built in to the datagrid class. I was hoping not to have to write an entire new control from scratch. Any direction is appreciated. George
Compiling Server Controls (5 replies)
ASPFriends.com 'aspngcontrolscs' list
I've been browsing through all of the cool server controls on asp.net lately and several of them include a zip file with several files in it with no .dll. For example, the new VoteControl control has these files included in the package: * Vote.cs * Vote.csproj * Vote.csproj.user * Vote.sln * Vote.suo * VoteDesigner.cs The included readme.txt file has under "installation instructions" something lik...
NOT ANSWERED: Mixing templates and child controls (2 replies)
ASPFriends.com 'aspngcontrolscs' list
Existing child control structure is like so: RandomList limit "5" ListSection limit "2" ListItem priority "3" Item 1 /ListItem ListItem priority "2" Item 2 /ListItem /ListSection ListItem priority "1" Item 3 /ListItem ListItem priority "5" Item 4 /ListItem /RandomList Because the items are being collected as child elements I haven't found a means for also allowing templates though that would seem ...
Toolbox images (3 replies)
ASPFriends.com 'aspngcontrolscs' list
I have a server control to which I wish to attach a Toolbox icon in VS.NET. I have successfully done this before, but for some reason in this particular project success is proving elusive. I have... ensured the file is called classname .bmp ensured the image is a 16colour BMP ensured the image is marked in VS.NET as Embedded ensured the image is 16x16 pixels Reset the Toolbox config and re added i...
Loading User Control to set position on page (3 replies, VIP)
ASPFriends.com 'aspngcontrolscs' list
How can I load a User Control into a set position on a page? At the moment I have a page with several nested tables and want to be able to dynamically add a user control to one of the cells in the tables. The page will receive quite a lot of traffic so I'm looking for a good scalable solution. Any ideas? Cheers, Julian Voelcker The Virtual World (UK) Limited Cirencester, United Kingdom
Custom control in a databound repeater (2 replies)
ASPFriends.com 'aspngcontrolscs' list
Hi all, Something that I thought would be easy has me tearing my hair out.I am guessing I am way off the mark with how I am attempting it. I'm not even sure if I am on the correct list for this particular problem .. How do I code a user control to take dataitem values? If I just stick my control in the webform and set the parameters everything is fine, when I use a databound repeater the plain htm...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com