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

Filter by week: 1 2 3 4 5

htmlfile: Invalid pointer :0 ?
Posted by Genival Carvalho at 5/31/2004 6:56:13 PM
Hello folks... Any tip to solve "htmlfile: Invalid pointer" error ? This error occurs when PostBack fires ! Just when i using SmartNavigation... ...more >>

InvalidCastException: QueryInterface for interface
Posted by ton at 5/31/2004 1:29:03 PM
Hi, when modifying my customserver control, I did not look at it for more then 2 weeks, I received an error: InvalidCastException: QueryInterface for interface ..... The interface was my COM object dbRecord.DLL, the method was a logon, but I receive the same errors with other simpler methods ...more >>

Combining attributes with base class
Posted by Rami Cohen at 5/31/2004 1:22:54 PM
Hi I am creating a custom button control, inheriting from System.Web.UI.WebControls.Button. I need to add client-side script to the onclick event. The problem is that the onclick attribute is generated by the Button base class if validation is enabled. If I override the AddAttributesToRender ...more >>

Dynamically loading and adding usercontrols after CreateChildControls
Posted by Hendrik W. Hansen at 5/29/2004 12:06:14 AM
Hi, I'm having a problem with loading and adding usercontrols dynamically after CreateChildControls. To be more specific, I have a number of buttons and a PlaceHolder control. When the user clicks one of the buttons, I want to load and add a different usercontrol in the click event handler, wh...more >>

Help needed with htmlinputfile controls
Posted by Robert Hanson at 5/28/2004 3:06:45 PM
Hi All, I am looking for help with getting the Value property from a htmlinputfile control when the user selects the Submit button on my form. I need to gather the file name only and not perform a File Upload procedure. Thanks in advance, Bob Hanson Centare Group Ltd. *** Sent via D...more >>

Generate dynamic controls from Database tables
Posted by aditya028 NO[at]SPAM yahoo.com at 5/28/2004 8:26:08 AM
Hi, I'm trying to generate controls like textboxes, drop downs dynamically. I need to get their type and the values from the DB. Any suggestions on how to generate them? Thanks Adi...more >>

Server Control Collection Properties Solutions,Problems MVP Advice Requested
Posted by Brian at 5/27/2004 11:09:22 PM
I have solved most of my Server Control Collection property issues. I wrote an HTML page that describes all of the problems that I have encountered to date and the solutions (if any) that I found. http://users.adelphia.net/~brianpclab/ServerControlCollectionIssues.htm This page also has all of t...more >>

Placeholder child of child control event problem.
Posted by caldera at 5/27/2004 9:50:34 PM
Hi, I have problem with placeholder which contain web user control. I want to add user control in placeholder. For example I have a.aspx and in this page I have a placeholder which is dynamically added web user control lets say at a time it is added that b.ascx. In this b.ascx I have button and ...more >>



RegisterStartupScript and IsStartupScriptRegistered not shown in listed methods of Page
Posted by andborges NO[at]SPAM hotmail.com at 5/27/2004 9:30:41 AM
Hi All, I'm building an Webcontrol and overriding OnPreRender i want inject client javascript, but RegisterStartupScript and IsStartupScriptRegistered is not been shown in the list of methods of Page object. If i put Page.IsStartupScriptRegistered or Page.RegisterStartupScript in code i do...more >>

Setting user control property dynamically?
Posted by Dave at 5/27/2004 6:51:02 AM
Hi I created a user control that has a property that accepts a url ("NavUrl").. I tried to set the value as follows directly in the aspx page where strLink would be a link. <uc1:mycontrol id="mycontrol2" runat="server" HtmlContent="html stuff goes here." ImgUrl="myimage.gif" NavUrl="<%Response....more >>

Composite Control Designer
Posted by Alexander Popov at 5/26/2004 12:10:06 PM
i have following sample Control [ParseChildren(true)] [PersistChildren(true)] public class MyControl: System.Web.UI.Control { MyCollection values_ = new MyCollection (); [PersistenceMode(PersistenceMode.InnerProperty), DesignerSerializationVisibility(Designer...more >>

fragment caching problem
Posted by Joe at 5/26/2004 7:21:05 AM
I have a custom control that generates client scripts and uses viewstate This control is placed in a user control that is placed in my application pages When I use OutputCache directive in the ascx (so that the control will not be generated each time), the client script and viewstate data of the c...more >>

Passing Parameters to User Controls that are Dynamically Loaded in Placeholders
Posted by josh NO[at]SPAM rb.com.au at 5/25/2004 4:43:52 PM
Hi Guys, I have been having a big problem with trying to pass parameters into a user control when the user control is dynamically loaded into a placholder. I am developing in c#. I have get and set methods on the user control "editButton.ascx" which work fine. How do i pass parameter into...more >>

Button.Init? how Do I know if click event has been fired? TextBox.TextChanged event before Button.Click in a CompositeCustomControl.
Posted by jorge at 5/24/2004 8:38:01 PM
Hello I have the following situation: (everything is dynamic (controls.add)) 1. Button.Init { WasButtonClickFired = true } 2. TextBox.TextChanged { WasButtonClickFired? } 3. ImageButton.Click { } I need a way to get the TextChanged event not to fire or at least to know ...more >>

How To Write the external Iterator?
Posted by apex at 5/24/2004 4:24:49 PM
Hi all: I want to write an iterator class for GHashTable which belongs to GNU glib[ c library ] .Access function of GHashTable now only support internal iterator and define struct _GHashNode { gpointer key; gpointer value; GHashNode *next; }; and struct _GHashTable { gi...more >>

Accessing the visible property of a User Control at runtime
Posted by johnStein at 5/23/2004 6:51:02 PM
I need to make visisble/invisible my user control at runtime I am using code-behind and there is no access to the control here What do I do ...more >>

Font Properties and how to use them
Posted by Pete Ehli at 5/20/2004 6:54:41 PM
Hello List, I have a custom web control that during the render phase of the controls life cycle I am rendering a table with one row and two columns. I have text inside a column of this table and I want a user of my control to be able to change the Font properties of this text. Below is the code...more >>

DataGrid Viewstate problem
Posted by Josema at 5/20/2004 4:16:08 AM
Hi, to all.. I have 2 web controls (MyDataGrid.cs, MyCalendar.cs The first inherits from calendar, and i have implemented the event MyCalendar_SelectionChanged and inside of this i put in the viewstate a datatable that i filled (and its filled, i verified)... like this Viewstate.Add("DATA"...more >>

Prevent tag properties automaticaly generated by ASP.NET
Posted by Henri at 5/20/2004 1:35:21 AM
When I use System.Web.UI.WebControls.Image, ASP.NET automaticaly outputs : <img border="0" /> Is there a way to prevent this border="0" to be added, without creating a custom Control? ...more >>

Programmatically using and adding htmlcontrols
Posted by Chris Kennedy at 5/18/2004 8:02:54 PM
I have a composite control which dynamically adds controls depending on how it is intialised from an XML file. This all works well with web controls. I want to be able to add an htmlinputfile server control. This best I got so far is a literal e.g. fileid = "<input type='submit' id='submit1' ...more >>

AddParsedSubObject and LoadViewState
Posted by michaelacombs NO[at]SPAM hotmail.com at 5/18/2004 3:14:24 PM
I am building a combobox webcontrol which works from a collection of ListItems similar to a standard DropDownList. It uses AddparsedSubObject to load the nested ListItem objects (below). <cc1:combobox id="ComboBox1" runat="server"> <cc1:ListItem Text="test1" Value="1" Selected="False"></cc1...more >>

Submit form
Posted by Chris Kennedy at 5/17/2004 10:17:08 PM
I am creating a control which will upload files. The problem I am having is the button event I have created does not seem to see the files getting posted to it. My first guess is that my event is not posting the form. I can add a submit button. How do I create an event that will respond to the s...more >>

__doPostBack generates JavaScript errors in UserControl encapsulating form
Posted by jsausten NO[at]SPAM hotmail.com at 5/17/2004 7:40:19 PM
I have a form shared by several aspx pages. It's the only form appearing on the pages, so I though I would encapsulate the form in a User Control to simplify maintenance. The ascx page looks like: <%@ Control CodeBehind="myForm.vb" Inherits="Project.myForm" Language="vb" AutoEventWireup="false...more >>

Templates/user controls or both??
Posted by Divya at 5/17/2004 3:51:07 PM
Hello I am trying to use a template in my asp.net application so that, I can use the same code for different sites (each site must have a different template - style and content). What would be the best approach? I came across a few articles that talked about using template controls. I am not sure ...more >>

changing input type file
Posted by Gladriel at 5/17/2004 4:06:01 AM
i would very very much like to change the browse button on the file upload to one of my own am i right in thinking if i create an inhertited control and overwrite its TemplateSourceDirectory (inherited from Control) can I point the control to a aspx page containing a textbox and my own button...more >>

Repeater
Posted by Galadriel at 5/16/2004 4:06:04 PM
is it possible to get the repeater control to display items across a page i realise that i can use table cells to get it to repeat across but that would just repeat in one row on and on <table><tr><itemtemplate><td>index=index+ </td if index=mod(count of items rendered / 3.... e...more >>

Passing an object as a property???
Posted by Henri at 5/15/2004 11:10:12 PM
Is it possible to do sth like this ? Page's code part: Private xmlObj As New XmlDocument(......) ---------------------------------------------------------- Page's HTML part: <MyNS:MyControl runat="server" document="xmlObj" /> ----------------------------------------------------------...more >>

Problem with Property values in HTML tag
Posted by Ed Swartz at 5/14/2004 10:31:22 PM
When I set one of my custom control properties programmtically the control, as below, the control gets the value and spits it back out at the right place. Everything works fine. EdsControl.TrailDelimiter = " ***> "; When I set the property value in the tag the property value is not set ...more >>

Sending output via a user control
Posted by Eric Caron at 5/14/2004 7:26:36 PM
Ok, newbie question here: I want to display a dynamic menu using Response.Write statements in a user control, but the output comes out at the top of the rendered page instead of where the user control is located on the page. Is there a way around this? TIA. Éric ...more >>

Top-Level Styles: Parser complains about inner text
Posted by Ed Swartz at 5/13/2004 5:24:29 PM
I'd like to support top-level styles in my control. I created a property (per Developing Microsoft ASP.NET Server Controls and Components). And added ViewState Load, Save, Track, etc per the book. When I run my app the parser complains about the BackColor="Red" inner text. I don't see why I'm...more >>

Listbox in Custom Control doesn't keep listitems added on Page_Load of container page
Posted by Joshua Gunder via .NET 247 at 5/13/2004 9:58:11 AM
This is my first attempt at building my own compiled custom= control=2E I have a custom control that contains a textbox and a= listbox=2E In a given aspx=2Evb class I will instantiate my custom control and= bind its listbox to a datareader, (If Not PostBack)=2E The custom control loads on th...more >>

WebControl Designer Problem using Custom Collection
Posted by Todd Lucas via .NET 247 at 5/12/2004 9:56:07 PM
I'm having some weird things happen in design view while editing= a custom collection - I've been at this for about 4 weeks now,= and have tried all the different combinations of persistence= settings (DesignerSerializationVisibility, PersistenceMode, etc)= there is, and all to no avail! I'...more >>

Connecting webcontrols and components
Posted by cpnet at 5/12/2004 5:59:09 PM
I have been struggling with this for a long time now, and am beginning to think that what I'm attempting isn't the correct approach. The short version is that I want to be able to add a webcontrol to a page, and have that webcontrol have properties that reference other webcontrols and/or compon...more >>

Passing property value to custom control
Posted by Chris Kennedy at 5/11/2004 8:00:39 PM
I have a custom control which uses an XML file in the = CreateChildControls event, the XML file is used to determine how many = and what composite form elements to add. I can set the path to a = different XML file on Page_Load event of the parent page. When I press a = button even if contains no...more >>

Custom Server Control Property Validation Issue
Posted by Jim-M at 5/11/2004 3:10:32 PM
I've been developing a custom server control that composites a Calendar control and several other controls. In this class, I have two properties that can be set either at designtime or at runtime. The two properties are of Integer type and represent the minimum and maximum number of detail li...more >>

control designer woes
Posted by paul.driegen NO[at]SPAM weston.ca at 5/11/2004 12:56:27 PM
Hi all, I'm desperately trying to build a tab control for our internal corporate web sites. I have it up and running fine in run-time mode. The problem I'm encountering is trying to build a designer that would render some semblance of the tab control's state at any given point. The tab c...more >>

WebControl Design View Persist Problem
Posted by Todd Lucas at 5/10/2004 10:46:08 AM
I'm having some weird things happen in design view while editing a custom collection - I've been at this for about 4 weeks now, and have tried all the different combinations of persistence settings (DesignerSerializationVisibility, PersistenceMode, etc) there is, and all to no avail! I'm hoping som...more >>

Passing values to a custom control
Posted by Chris Kennedy at 5/9/2004 1:21:54 PM
I am building a custom composite control which reads in information from an XML file. I want to be able to point my control at different XML files for maximum reusablity. How can I pass a parameter to my component. I am a bit new to this but ideally would like the rest of my team to be able to us...more >>

add button dynamicly to page
Posted by mahsa at 5/9/2004 9:56:04 AM
Hi I add butoon dynamidly to page but I have to double clock ob button until it work I set auto post back =true for butoon that if i click just one time on it it run the void but still I have to click button twic //new Ro TableRow r2 = new TableRow() TableCell c20 = new TableCell() c...more >>

Controlling the ViewState of children controls
Posted by Manuj Aggarwal at 5/7/2004 6:20:13 PM
I have a custom Grid control which inherits from ASP.NET DataGrid control. In this custom control I also have some other server controls e.g. a drop down list to manage paging for the grid. I want to disable viewstate on main Grid but I do want to maintain ViewState for child controls like pager...more >>

Web Custom/Composite controls default property render issue.
Posted by andreisinelnikov NO[at]SPAM sierrasystems.com at 5/7/2004 2:06:20 PM
Hi, I'm trying to build TextBox based custom web control. Part of this control is shadowed CssClass property: <Description("Choose Css property from the list.") _ , DefaultValue(GetType(CssType), "RequiredInput") _ , TypeConverter(GetType(EnumConverter))> _ Public Shadows ...more >>

two classes
Posted by TJS at 5/7/2004 1:09:45 AM
how can I call class b method b, from class a method a ? ...more >>

Custom Control with embedded graphic
Posted by Dave Birchok via .NET 247 at 5/6/2004 1:08:56 PM
I am developing a custom control for web forms using VS 2003=2E I= am putting the control in a custom control library project which= will become a dll=2E This control uses a small bitmap=2E I don't= wnat to have to copy the graphic file into each web project that= will use this custom cont...more >>

how to put checkbox control by using checkboxlist within the repeater?
Posted by angus at 5/6/2004 12:26:58 PM
how to put checkbox control by using checkboxlist within the repeater? ...more >>

problem about datagrid
Posted by angus at 5/6/2004 10:05:47 AM
Hello all, I have a problem in using the DataGrid. In my web form, i've put a <asp:button/> button, if it is clicked, a function will be called to connect to the database, get the data and return as a dataset. Finally, a DataGrid will be "binded" by the DataSet. that is....something like ...more >>

Small Doubt
Posted by Ashish M Bhonkiya at 5/5/2004 6:41:40 PM
What is the difference b/w a usercontrol and a Custom Web Control ? When to use the usercontrol and when to use a custom web control ? How to add javascript to the Elements in the custom webcontrol ? Any pointers for the above questions are highly appreciated. Thanks for your time. Rega...more >>

Header Control
Posted by Martyn Fewtrell at 5/5/2004 1:53:08 PM
This is one that has had me puzzled for some time and although I assume that the solution is relatively straight forward but I haven't yet seen an example or solution or managed to work one out. If you create a user control for header, navbar etc the hyperlinks only work if the relative locati...more >>

Fontinfo expand/collapse
Posted by Shawn Meyer at 5/5/2004 1:21:08 PM
I added a fontinfo property to a custom control public FontInfo TitleFont { get { return _title_font; } set { _title_font = value; } } In the designer TitleFont it is not expandable like on all other controls Font properties. Instead it is just a blank text box that you can type text int...more >>

Determining 'first load' state of a dynamically inserted control
Posted by John Burke at 5/5/2004 11:00:14 AM
Hi Group, Is their an existing convenient method for determining if a usercontrol has been loaded for the first time? The usercontrol itself may be initially loaded on subsequent postbacks, not the initial page access. I am assuming I cannot use IsPostBack, as that appears to refer only to ...more >>

Custom control viewstate (?) issue!
Posted by u3k NO[at]SPAM mail.ru at 5/4/2004 11:20:27 AM
I've been struggling for a day and yet haven't found a solution to such a problem: I have, let's say, an apsx page, which contains a UserControl, which adds to it's Controls collection a new control, dynamically loaded via LoadControl, which in order is also a UserControl, visually designed. ...more >>


DevelopmentNow Blog