microsoft.public.dotnet.framework.aspnet.buildingcontrols
Up to: Discussion Lists

  • RSS Syndication
  • Post a new message to this list...
    Latest Discussions Archive
    Composite controls not visible at design time (6 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi all I have a few questions regarding composite controls 1) My composite controls are created based on a property of my control. When the postback of a page occurs due to a button click, my CreateChildControls() method is called before the button code is executed, so if that button code changes the property in question it is already too late to reflect this in the control. Is there a way to "Inv...
    Creating Menu controls on the fly (4 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I am reading off menu items from an XML file. The problem I have is how to create these menu items into link buttons on the fly. As the number of menu items will vary depending on the contents of the xml file. So I cannot initialise these all these link buttons one by one at start. So I was wondering whether there was a way to dynamically create them?
    Detecting Null Values (6 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have a DataGrid from which the datasource is a SqlDataReader based on a SQL Server Stored Procedure. This SP returns columns will NULL values. When I DataBind() to the DataGrid, all is well. It's when I want to detect these null values in the ItemDataBound event that...well...I can't detect them. I've tried everything I can think of. Why does'nt (e.Items.Cells[1].Text null) work? tia, j
    Composite control not raising events (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I am trying to create a control that duplicates the Access Combo Box OnNotInList behavior. The code below does not fire the DropDownListPersistedData SelectedIndexChanged event Any suggestions? Imports System.ComponentModel Imports System.Web.UI Imports System.Web.UI.WebControls Public Class ComboBox Inherits System.Web.UI.WebControls.ListControl Implements INamingContainer Protected TextBoxNotInL...
    Compress/compact HTML during rendering (5 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I'm writing some custom controls, and I'd like to be able to remove all unnecessary whitespace, etc. from my output. Ideally, I would just render as normal, then remove this extra whitespace as the last step in the rendering process. I'm sure I saw code to do this, but now I can't find it. Is this something I have to do as I go, or can I somehow do this in a single, last step of rendering? Thanks,...
    Double-qoutes problem in CreateChildControls() (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    In my CreateChildControls() function, I am adding onClick code to a HyperLink control. The OnClick makes a call to a javascript function and looks like this: hlDisplay.Attributes.Add("OnClick", "javascript:showPopup(document.all." this.ClientID " " textBox.ID ", " "\"test string\")"); The problem is the double quotes around the 2nd parameter, "test string". I would like the above to render as: a h...
    How to add an event handler at run time? (5 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have created an array of buttons at run time and need to associate them a click event. I have added the following routine as the event: public void UpdateClick(Object sender, EventArgs e) { lblError.Visible true; lblError.Text "It worked"; } Below I have included the line of code used to hook up the button with the event: btnUpdate[intElement1].Click new System.EventHandler(UpdateClick); The cod...
    Events not firing from page-behind file from Page.LoadControl (4 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I am trying to load a control (.ascx) that also has an associated code behind file. I use Page.LoadControl to do so, but I'm seeing some weird results. Only the markup in the .ascx file is loaded and everything in the control's associated code behind file is ignored. If I add a break point to even the OnInit function, it doesn't get hit. Is there a way to load a control (dynamically) and have ...
    In true, i need to pass a placeholder by param (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi again. I'm wrong in my first message. What I need to do is, render my control in a placeholder passed by param. I try somethings here, by I get this error: A value of type 'System.Web.UI.WebControls.PlaceHolder' cannot be serialized. Someone know any way to do that? Render a custom conrol in a specifi placeholder? Thanks
    Composite Control - Viewstate management for complex properties (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have seen several composite control examples where LoadViewState and SaveViewState are overloaded to track viewstate on complex objects such as styles, but I cannot find anything that tells me why I need to do this. Can someone tell me why is this code not sufficient for Viewstate management? if (style null) style new Style(); ((IStateManager) style).TrackViewState(); return style;
    Nesting <asp:image> in HeaderTemplate? (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I'm creating a user control with a repeater and exposing a property to set an asp:image control that's in the repeater's header since this control will have different .gif files at the top of each repeater. However when I try to set the property in design or run time I get: &quot;System.NullReferenceException: Object reference not set to an instance of an object.&quot; When I move the asp:image control ...
    Dynamic Table Build Using DataRowView (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    All I'm trying to build a table dynamically from a DataView using IEnumerator. It will be read only data for printing on Avery 5160 label stock. I had some trouble making the while(viewCounter.MoveNext()) and foreach(DataRowView in dv) samples work as I was not able to stricly break these loops on the 3rd column. If the DataView has 6 records total, I need 2 rows of 3 cells. The code below gives m...
    Nested control in Web Custom Control and ViewState (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I am working on a Web Custom Control that will function as a Tab menu. I am having problems with figuring out what I need to do to link up the viewstate for controls that are nested in my Custom Control. I'm really not sure how to try to explain this, so here is some sample code that will illustrate the problem I am having: MyTestASPX.aspx %@ Register TagPrefix &quot;cc1&quot; Namespace &quot;IAIWebControls&quot; Ass...
    Problem creating DLL for a composite control (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have a ASP web page that has its own codebehind vb file. But then I am using a composite control in that page. The code for the control is built from a vb file. But I having problems as I can't get MS VS.net to create the DLL of the composite control in the BIN directory. I thing it might be to do with page directive code. Can someone tell me if they see a mistake below? webpage.aspx: %@ Page La...
    Annoying span (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, Ive a annoying problem when creating Custom WebControl. When i create this sample control in codebehind. It renders as: span id &quot;testctrl&quot; input name &quot;testctrl:testctrl&quot; id &quot;testctrl testctrl&quot; type &quot;text&quot; value &quot;TestValue&quot; / /span Why does it render span tags? How can I create it without them? Best regards Banski using System; using System.Web.UI; using System.Web.UI.WebControls; using System....
    Ignore literal content when parsing custom control children? (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I'm sure this has been asked before... Is there a setting or attribute that I can specify on my control to tell the page parser to ignore literal content when parsing children of my custom control? I'm overriding RenderChildren of my parent control and the literal content is causing me so headaches. Also is there a best practices document on creating custom controls. Any ideas gratefully appre...
    Server farm and fields of classes in session cache (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I'm building some ASP.NET components, and I'd like them to function in a server farm scenario. I have one class, &quot;AppClass&quot; that contains only read only data. I also have a second class, &quot;SessionClass&quot;, that stores a reference to an AppClass i.e: SessionClass sc new SessionClass(); sc.AppClass (AppClass) Page.Application[&quot;AnAppClassInstance&quot;]; Consumers of my components will likely create a single...
    Run/design time packages (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Should I include my designers in the same assembly as my controls? This seems to me to be a bit of a mix up of purposes. Do you people typically provide a single assembly with both controls designers in, or do you create an additional &quot;.Design&quot; assembly in which you place all of your designers? Thanks : ) Pete Read or write articles on just about anything http://www.HowToDoThings.com
    Creating control dynamically (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Dear All, I need help with the control In my database will store page detail including field name and type of control to display in the page such as Page 1 Name , textbox Lastname , textbox Age , Dropdown , tblCustomerAge (this is data source) The problem is I need to create the control in the web page exactly what I can retrieve data from the database. Anyone has any idea ? From: supak C Posted b...
    non-createable base control? (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I have created a base control that some other custom control derive off. I dont want this base control to be createable what is the best recommended way to do this? Implemented base control constructor as a protected constructor? Thanks Donal
    Tool Tip for DropDown list (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I have a dropwnlist of fixed width. The item names in the dropdown list are quite big. The Tooltip property for a dropdownlist control doesnâ t work!. So using DHTML, I refreshed the contents of a DIV on the mouseover event of the dropdownlist control. This works fine. Now, the problem is the tooltip is required on the expanded list too. How can we capture these events? Else: Is it possible to...
    Web Custom Control - Design Time Support ? ? ? (5 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    How do I implement design time support for a web custom control? For some reason the control can't seem to find System.Web.UI.Design and I get the following compiler error: C:\Documents and Settings\MLibby\My Documents\Visual Studio Projects\CustomControlEnum\CustCtrlDesigner\CustCtrl.cs(3): The type or namespace name 'Design' does not exist in the class or namespace 'System.Web.UI' (are you missi...
    Web Custom Control - Retrieve Images from a Multifile Assembly (3 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    How do I store an image and a web custom control's dll in a multifile assembly so that the image can be retrieved and displayed while the control is in design mode? This would allow the control to display a company logo while in design and ensure that the logo's image file does not get deleted or lost causing design mode problems. I know that the possibility exists to have multifile assemblies whi...
    Reacting to events of a composite controls (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have read some tutorials on composite controls. They all all tend to be on static controls such as tables etc. They don't seem to cover on dealing with user events on the controls. I have created some LinkButtons on a composite control, but I need to be able to react to which of these linkbuttons the user presses. So I need set parameters of onCommand CommandArgs for the linkbuttons. BUt I canno...
    Question on HTML and Web(Server Side) Controls (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I know more html is needed to really produce this but enough is here for me to ask my question. So, this HTML code produce 2 buttons. One button is a HTML control and the other is ASP Web or Server Control. Why are there 2 ways to create buttons if they so the same thing? Do they do the same thing? In what senario would I use a HTML button rather than a Web control button. Does it matter? If not w...
    Help: RTF Control for Web Page (6 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi All, Hoping someone has done something like this in the past. I'm trying to work out the best way to add an RTF control to my web page and save it's contents as html back to a database. Currently I have a page with a textbox. The user enters plain text and hits save. The text is stored to the database. Simple as. However I'm looking to enhance this so that the user has U, B, I and hyperlink fea...
    Does .NET provide any mechanism to replace ActiveX controls on web? (8 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, Is there any mechanism in .NET Framework which can help me to replace activex controls on my web page?? As activex controls need to be downloaded on the client machine, and my clients are not interested in downloading any such binaries to their machines for a bunch of reasons, including the consumption of bandwidth as a strong one. Like, by the virtue of .NET framework, can I acheive the funct...
    use UrlEditor in Component Editor forms (7 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hello everyone, I have built a server control and managed almost everything I wished to achieve with it using the book MsPress book on developing server controls, I do have one problem. I have made a component editor (property builder) form and its working perfectly apart from my URL properties. My question: Is it possible to place a button next to the text fields that can invoke the UrlEditor dia...
    select a url at design time (6 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi all, I have the following code from MSDN.But when I click a button in property grid at design time, an error is popup:&quot; Object refrence not set to an instance of an object&quot;. Is there anything I missed? EditorAttribute(GetType(System.Web.UI.Design.ImageUrlEditor), GetType(UITypeEditor)) Public Property imageURL() As String Get Return imgURL End Get Set(ByVal Value As String) imgURL Value End Set...
    System.ComponentModel.Design.ArrayEditor - How to (5 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have a custom control which is a set of tab images like in hotmail. In my control I have a hard coded array that sets the string value of the tabs. private String[] tabCaptions { &quot;Home&quot;, &quot;Tab 1&quot;, &quot;Tab 2&quot;, &quot;Tab 3&quot; }; I would like these tab captions set by the user of my control via the properties window. i.e. the code below that I have so far. using System; using System.ComponentModel.Design; nam...
    how to add class attribute to html code? (4 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I have a control that has a property. The property is a class type. I have made it expandable in property grid like fontinfo class. But I set a property of that class, the property is not written to the control as an inline attribute. For example: if you set size property of font in lable control, there is an Font Size &quot;10pt&quot; in asp:lable .../ . How can I do this? Thanks!!! Neo
    Calling IsValid in a web control (4 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi All Is there anyway to check the IsValid property in a user control? I've made a user control that holds a number of validators. There are also event handlers in the control that handle button presses. The problem is that the IsValid property is defined on the page and isn't available in the control itself. Does anyone know how I can find out if the page is valid from inside the control? I dont...
    How to set selected item in drop-down list in datagrid (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    General question I haven't seen answered: If I have a datagrid with a template column in which a drop down list is bound to a datasource, how do I set the selected item in the drop down based on the datagrid column value? (for example if the column is text and I want a drop down to list &quot;A&quot;, &quot;B&quot;, and &quot;C&quot;, how do I set the selected item to &quot;B&quot;?)
    How to add images in a DataGrid (3 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi Friends, I have a database having all the country names and some geogrphical details of the countries. I am displaying it in a DataGrid. I want to add Flag of each and every country. My customer is breaking my head. Can anyone guide me? Please!!! ThankZZZ, SamuelSudhakarJ
    Accessing ControlDesigner from control? (4 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I'm trying to do the following: public class MyControlDesigner : System.Web.UI.Design.ControlDesigner { private string m html &quot;&quot;; public string Html { get { return m html; } set { m html value; } } public override string GetDesignTimeHtml() { return m html; } } [DesignerAttribute(typeof(MyControlDesigner), typeof(IDesigner))] public class MyControl : System.Web.UI.WebControls.WebControl { override...
    DataSources from Session? (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have some server controls I've built that store their properties in the ViewState like good little controls :) However, When I set my &quot;DataSource&quot; property of the controls to a DataSet or DataTable etc thats in the session, it copies it into the ViewState. The DataGrid control doesnt seem to do this if you do the following: myDataGrid.DataSource Session[&quot;mydatasource&quot;]; How can I make my control...
    Custom Webcontrols, VS EDI support and intellisense? (5 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi All I have been working on some custom webcontrols. Among other things I have extended the datagrid with a few things Everything is working perfectly nice and smooth But how on earth do I add xsd schemas for intellisense etc? My webcontrols is in the namespace: Project.Web.UI.WebControls I have compiled an xsd file using the generator from BlueVisionSoftWare This file is saved in the same xml f...
    Multiple dependent dropdownlists in whidbey (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I'm trying to get 3 DropDownLists in an ASP.NET 2.0 page working together so that the value selected in DropDownList1 is used as a parameter which tells DropDownList2 how to populate itself. Equally, the value selected in DropDownList2 should tell DropDownList3 how to populate itself. The three DropDownLists should work as follows: Continent Country Region When I select something in the Contin...
    Implementing IPostBackDataHandler in a custom web control with VB.NET (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have created a custom class with Visual Basic that inherits from the drop down list web control. In order to update the value properly, I have tried to implement IPostBackDataHandler, but receive the following error message: Interface 'System.Web.UI.IPostBackDataHandler' is already implemented by base class 'System.Web.UI.WebControls.DropDownList'. My code is as follows: Imports System.Web.UI Pu...
    Events in a custom template control (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have written a template control which contains a button. I have added a public event to the control which I raise on the button's Click event. In the main page that contains an instance of this template control I have code in the codebehind page to handle this event. My problem is that this code never fires and in fact the form validation controls don't respond when I click the button either. He...
    How to expose WebCustomControl event (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, I have been working on this for more than a day, with no joy and I was wondering if someone could help me with this: I am trying to create a WCC (WebCustomControl) that contains a LinkButton (server side). I have compiled this WCC, added it to my VS toolbox and it is working ok, except I need Click event of my WCC. Say if I drag and drop my WCC from tool box onto a new WebForm and double click...
    Templated Data-Bound Control Sample (2 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have been attempting to create a templated data bound control, using the sample as a guide (ms help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpcontemplatedd ataboundcontrolsample.htm). The problem that I'm running into is that child controls in the template, such as labels, lose their data whenever the control's visibility state is changed to false and then to true. I can postback as ...
    trouble accessing usercontrol (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I'm trying create a User control named &quot;BrandList.ascx&quot; which has the potential to be either a dropdownlist or a listbox. Whether it's one or the other depends on the value of a property called DisplayMode. If the value is &quot;single&quot; or &quot;&quot; then it's a dropdownlist. If it's &quot;multiple&quot; then it's a listbox. I also have a property called SelectedItemValue which returns the selected listitem as a string ...
    Derived compound controls (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have a form with various contols, each of which I want to have a View Panel and an Edit Panel. I created a base class in TRControl.ascx.vb (there is a TRControl.ascx that contains one line: %@ Control Language &quot;vb&quot; AutoEventWireup &quot;false&quot; Codebehind &quot;TRControl.ascx.vb&quot; Inherits &quot;CMSearch00.TRControl&quot; TargetSchema &quot;http://schemas.microsoft.com/intellisense/ie5&quot; % ): Public MustInherit Class TRCon...
    Reporting errors from custom server controls (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    What is the proper way to report errors from custom server controls? For example, I'm writing a server control that takes a file name as an attribute. If the file doesn't exist, I need to report a &quot;file not found&quot; error. I'd like to do this in a way that mimics a ParserException; that is, the line within the .aspx that references my control will be highlighted as containing an error, along with my...
    Fire event when clicking on the specific cell in DataGrid without (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi All, I' d like to fir the event when user clicks the specific cell in a DataGrid using Asp.net. i dont want to use command button or hyperlink for edit. i just want that user just click on specific cell and then the event fire. no need to click on edit update button or select hyper link or edit hyper link. plz help me out this problem tenzeel.
    Events inside a class (2 replies, VIP)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hi, to all. I have a web control that has only a button for one hand. for another hand i have a class with one event: public Class1 { public event EventHandler Finded; private void OnFinded() { Finded(this, new EventArgs()); } //in the class i have a method that make a simple query to a database and store the values (if exist) into a datatable. public void Query() { Code with the query..... if(Myt...
    Clearing viewstate for dynamic user controls (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    I have a form that dynamicaly loads user controls based on user postbacks. Everything works well except that the framework seems to want to match the viewstate data from my previous control to the new control on post back even through the IDs are all different. Is there a way to selectively clear the viewstate of a control before the framework does the match and applies the viewstate? Disabling th...
    Share common code when developing single Control assemblies? (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hello: Having trouble getting IDE to play nice/accept when designing Controls that need helper classes... I would like to compile controls as separate controls yet share some common 'helper' functions. How can I set up or get the equivalent workability of CustomWebControl1\CustomWebControl1.sln CustomWebControl2\CustomWebControl2.sln CustomWebControl3\CustomWebControl3.sln CustomCode\SharedCode.sl...
    Inherited Web Label doesnt properly initialize "Text" property (3 replies)
    microsoft.public.dotnet.framework.aspnet.buildingcontrols
    Hello! I have a control i wrote which inherits from the built in Label control in ASP.NET. I wrote this control to add the &quot;for&quot; attribute of a 'real' web label. It worked fine and normal. I just recently reworked it so that the FOR property has a drop down in the property grid which lists all the static controls on the page by clientid (you can still type in your own text). Once i added the appro...
    Visit the archive for messages from this site.
  • February 2002 (7 items)
  • March 2002 (37 items)
  • April 2002 (71 items)
  • May 2002 (61 items)
  • June 2002 (43 items)
  • July 2002 (68 items)
  • August 2002 (72 items)
  • October 2002 (58 items)
  • January 2003 (51 items)
  • February 2003 (58 items)
  • March 2003 (44 items)
  • July 2003 (75 items)
  • January 2004 (246 items)
  • February 2004 (89 items)
  • March 2004 (50 items)
  • April 2004 (105 items)
  • May 2004 (50 items)
  • June 2004 (63 items)
  • July 2004 (47 items)
  • August 2004 (106 items)
  • September 2004 (26 items)
    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