all groups > asp.net building controls > april 2004
Filter by week: 1 2 3 4 5
hidden field 'is null or not an object'
Posted by foehammer NO[at]SPAM hotmail.com at 4/30/2004 3:42:18 PM
I've created a WYSIWYG HTML editor. I have an ImageButton whose
onClick event is supposed to set the value of a hidden form field
called txtHTML to the HTML content of an IFRAME called editor.
Here's the code that is supposed to set the value:
document.EditorForm.HTMLEditor_txtHTML.value =
ed... more >>
Passing messages to forms
Posted by William Gower at 4/30/2004 2:05:04 PM
I created a user control called MyToolBar which is a toolbar with a preset
number of buttons such as Close, Add, Edit, Delete, Find etc. When the user
clicks on the Find button, in my Button_Click procedure how do I pass a
message to the appropriate form such as Vendors that the button was click... more >>
Button in custom webcontrol - event handler not working
Posted by Divya at 4/30/2004 1:46:01 PM
Hello
This is my 1st project where I have to create a Webcontrol. I have created a simple custom control with a button and 2 labels added to a panel. My problem is that the event handler that I have assigned to the button [private void btnSubmit_Click()], is not getting invoked. Could anyone pleas... more >>
Custom control creation and debugging?
Posted by Dave at 4/30/2004 5:06:03 AM
Hi
I want to create a custom tab web control, drop it into an asp.net page as shown below, that will create a set of tabs and will generate client-side script and DHTML to toggle the tabs, show/hide panels ("div tags") etc. I would also like to expose a set of properites to set font, tab color, w... more >>
Having a Custom ScrollBar for Controls possible in .NET ?
Posted by Prashanth Uppunda at 4/29/2004 11:16:01 PM
Hi
I want to customize the look & feel of scroll bar which appears for controls like Textbox, ListBox, ComboBox etc. Is there any way to achive this in .NET
I could not see any direct ways to replace the default scrollbar with my own
Thank
Prashanth... more >>
control ID's
Posted by Jill Graham at 4/29/2004 4:16:47 PM
Hi,
My web page loads the controls dynamically using
Page.LoadControl("~/myControls/myControl.ascx")
The control myControl.ascx contains several controls with following ID's :
"_content1", "_content2", "_content3", ...
Once the control myControl.ascx has been loaded into the web page, the... more >>
Serialiazing CollectionBase
Posted by Victor Irzak at 4/29/2004 1:34:29 PM
Hello...
I the following class deriving from CollectionBase:
============================
public class YYYepC : System.Collections.CollectionBase
{
int i = 9;
[DefaultValue(4)]
[PersistenceMode(PersistenceMode.Attribute)]
public int I
{
... more >>
Modifying content of RenderControl
Posted by noreply NO[at]SPAM samuelhon.co.uk at 4/29/2004 3:58:09 AM
Hi
I'm currently using
Public Class Template
Inherits Control
Protected Overrides Sub Render(Writer As HtmlTextWriter)
Writer.WriteLine ("...")
Controls(1).RenderControl(Writer)
Writer.WriteLine ("...")
End Sub
End Class
in one of my controls. ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Dynamically add linkbuttons and wire them to same event??
Posted by Linda at 4/27/2004 5:35:10 PM
Hi,=20
How do I dynamically add linkbuttons and wire them to same event? I am =
able to add linkbuttons but they do not fire the event. Does anybody =
have a working sample?
Many thanks,
Linda... more >>
Refreshing web control after sub-property change
Posted by Bruce Parker at 4/27/2004 10:51:03 AM
I have the following
A class called PageHeader that derives from WebControl. The PageHeader class defines a property called ForwardButton As ForwardButtonProperties. This ForwardButtonProperties class TypeConvertor is the ExpandableObjectConvertor. I have defined several properties in the Forwa... more >>
User defined property saving problem
Posted by Alexandru Gurau via .NET 247 at 4/27/2004 5:44:54 AM
(Type your message here)
Hi,
I have a problem with a control (C#) found on the web wich=
implement a masked text box (derived from TextBox) in a dll=
file=2E It has a property 'Masked' implemented as an enum that=
alows you to select the mask you want (none, date, phone, digit,=
decimal ... more >>
Source or Knowledge on Building Image Control
Posted by chigger at 4/26/2004 9:51:58 PM
Hello,
Can someone point me in the right direction on how I can build an
image control in VB.NET. I would like this control to be used in either
a windows form application or in a web application.
Is this possible to do? I am finding it very difficult to obtain good
information on how t... more >>
FindFormForMenuItem
Posted by JackRazz at 4/26/2004 10:10:29 AM
I can't figure out how to find the Form for a MenuItem is on using a reference to the
MenuItem only? I'm looking for something like the FindForm method for controls. I
finally figured out how do do it for components (see below), but I can't figure out
how to do something similar for menu items.... more >>
Server control that renders images
Posted by Stephen Walch at 4/23/2004 3:35:36 PM
Trying to think through how to create a server control (or user control)
that renders some HTML plus any needed images. The rendered HTML would
include IMG tags with URLs that point back to the same page in such a way
that my server control would have a chance to render the image as well.
There... more >>
WebBrowser Control won't run in a UserControl
Posted by Paul J. Lay at 4/23/2004 12:02:38 PM
I can get the WebBrowser control (shdocvw.dll) to run great on a form using
either C# or VB.net but if I try to include it in a user control and then
drag the user control onto a form in another project, it doesn't work at
all. Are there some pitfalls in doing this? Thanks for any insight that ... more >>
how to pass on a variable from a page to a user control / best practice
Posted by Andre Beier at 4/23/2004 9:36:14 AM
I have a general question what the best practice is passing along values
from an aspx-page to a user-control.
Let's say I call an aspx page like this: myaspxpage.aspx?id=5.
On that page I use Request.Params to store the id value in a variable.
But i also need that id value in the user-contro... more >>
Retrieving radiobuttonlist from datagrid
Posted by sona Rampall via .NET 247 at 4/22/2004 9:55:04 PM
I am binding a radiobuttonlist to a datagrid on the ItemDataBound event. See code:
Sub dtgAccesSite_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles dtgAccesSite.ItemDataBound
Dim radAcces As New RadioButtonList
r... more >>
DataGrid childcontrols problem
Posted by Richard Watt at 4/22/2004 6:30:54 PM
Hi,
I am developing a custom control that inherits from the
datagrid. I want the normal functionality of the
Datagrid, then several buttons created underneath the
grid (not in the footer or pager).
In my basic example below I am creating a single button
in the overridden CreateChildC... more >>
value in textbox in ascx from aspx
Posted by Murphy at 4/22/2004 4:11:22 PM
How can I obtain the value of a text box in an usercontrol from the aspx
page ?
I'm using VB and WebMatrix and am presently learning asp.net whilst
struggling with the OO concepts...
Thanks
Murphy
... more >>
Custom Calendar Web Server Control
Posted by Ajit at 4/22/2004 11:00:05 AM
Hi
I am building a calendar control with an functionality to change year.
so, i have a dropdownlist box populated with years.
When the user change the year in the dropdownlist box
accordingly i addyears to the calendar control.
Now, the problem is how shld i refresh / redraw the calendar... more >>
Composite Control Question: Re-creating DataGrid child control upon Postback?
Posted by debartsa at 4/22/2004 10:37:48 AM
Hi Everybody,
I have a composite control (in C#) which creates a DataGrid child control
that binds to a DataSource (DataSet resultant from a sql query) passed in by
the consuming .aspx. The .aspx page does the typical... if (!Postback)
{ //define datasource and bind } My question is ho... more >>
Seeking Ideas for Controls
Posted by Ed Swartz at 4/21/2004 6:33:57 PM
I'm seeking ideas for custom web controls.
Ed
... more >>
User Control - InvalidCastException: Specified cast is not valid
Posted by Ajit at 4/21/2004 4:49:57 PM
Hi,
My control works fine unless until i add dropdownlist box.
When i add dropdownlist box to control and try to test that
control in my aspx page it gives the following error.
===================================
Specified cast is not valid.
Description: An unhandled exception occurred dur... more >>
Attribute Design Time Support
Posted by Ram at 4/21/2004 12:06:06 PM
Hi,
I have an user control(.ascx) file with one Text Box and a Regular Expression Validator. I wrote property in the User control Code behind (C#) to set the ErrorMessage for the RegularExpressionValidator. Now, I want this property to be displayed int the "Proeperties Window of the User control" ... more >>
Custom control help
Posted by raj.surisetti NO[at]SPAM aeromech.usyd.edu.au at 4/20/2004 6:32:36 PM
Hi,
Can anyone help me to build custom control for the following
<HEAD>
<LINK href="~/Styles/Blah.css" rel="stylesheet" type="text/css">
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScrip... more >>
Accessing User Control properties from C# Code Behind...
Posted by jonratcliffe NO[at]SPAM yahoo.co.uk at 4/20/2004 8:31:01 AM
I am not using (can't use) vs.net to create my asp.net pages - I am
using dreamweaver MX (essentially using it as a glorified notepad).
I am using C#.
Pages involved:
header.ascx - an in page (ie not a code behind) user control
default.aspx - an asp.net page
default.aspx.cs - a code behind... more >>
Creating a COM+ object with c#
Posted by 601 at 4/20/2004 2:34:32 AM
Is it possible to use c# and .NET to create a COM+ object that can be
accessed in classic ASP/VBScript using Create.Object ?
--
W '04 <:> Open... more >>
Enum causes compiler errors
Posted by Ed Swartz at 4/19/2004 6:22:46 PM
In my web control code I define an enum:
public enum LayoutDirections
{
Horizontal,
Vertical
};
In my demo web application I get and set an enum value like so:
T.LayoutDirection = T.LayoutDirections.Horizontal;
When I compile the web app which uses the web control I get:
Int... more >>
Composite Control not receiving DataGrid (child control) events?
Posted by debartsa at 4/19/2004 4:12:40 PM
Hi Everybody,
I have a composite control (CompositeControl) which uses an instance of the
DataGrid (DataCtrl1) as a child control.
The DataGrid is dynamically created in the CreateChildControls() method of
my control and is responsible for rendering a list of web sites. The
DataGrid also g... more >>
Dropdownlist
Posted by koen van meerbeeck at 4/19/2004 3:01:23 PM
Hi All
I'm creating an application and I want to add images to a dropdownlist in
asp.net using C#.
Can anybody help me with this plz.
Koen
... more >>
Persisting control properties at design time
Posted by cpnet at 4/19/2004 1:20:04 PM
Sorry, this is a 2nd post related to this problem, but I've now set up my
MSDN e-mail id, so I wanted to post with this e-mail.
I'm trying to build some custom controls/components for use with ASP.NET.
I have ControlParent (I've tried this where ControlParent is a Control, and
also where it's ... more >>
deriving from BaseDataList to make a custom datagrid that is 100% client side...
Posted by Fred Hirschfeld at 4/19/2004 7:33:56 AM
I want to create a custom datagrid control that uses XML data islands to
control the data client side with editing. I am trying to inherit the
minimal for implementing this server control and would like to derive from
BaseDataList. Does anyone know what I need to put in the two abstract
methods ... more >>
using many user controls
Posted by suresh kumar via .NET 247 at 4/17/2004 2:19:56 AM
Hi,
I would like to use user controls such that my complete site contains just only user controls, but aspx pages which hold them.
i would like to have only one aspx page for diaplaying the controls, but dynamically i would like to load each control based on some criteria and display only one at a... more >>
How do I save controls that are part of my custom control?
Posted by Ken Varn at 4/15/2004 2:58:25 PM
I have a custom list control that allows other controls to be added to it
dynamically. I want to be able to maintain the custom list of controls on
postback. I tried storing each added control into a ViewState element, but
the WebControl object cannot be stored in ViewState (I get an exception
... more >>
How to strong name an assembly which use interop.shell32?
Posted by Nicola Garone at 4/15/2004 2:57:57 PM
Hi group
I developed a custom control wich use some shell functions, I've added
reference to shell32.dll, defined wrap for some interfacee and declared my
shell32's functions I need. Now it work fine in a test form, and load and
shows in a asp.net form. But when it need to use shell32 functi... more >>
UserControl and Properties
Posted by Zürcher See at 4/15/2004 2:20:28 PM
Who can explain me why this very simple UserControl with the "Document"
property, when is in a WebForm, I can't see/set the "Document" property from
the Properties Frame of VisualStudio?
WebUserControl1.ascx
<%@ Control Language="c#" AutoEventWireup="false"
Codebehind="WebUserControl1.ascx... more >>
Postback to a web custom control HELP Please!!!
Posted by Chris at 4/15/2004 8:39:24 AM
Does anyone know how to postback to an inherited custom control from a
pop-up window?
Thanks in advance.
... more >>
Dynamic tabstrip and multipage
Posted by felad NO[at]SPAM walla.co.il at 4/15/2004 5:34:42 AM
Hi
I'm creating an asp net application with dynamic controls,
I have a dynamic tabstrip and multipage and each page is filed with
several controls types based on SQl database.( The code that create
them in in the Page_Init )
The problem - When I first load the page everything works OK and wh... more >>
Generic ascx controls with properties
Posted by Bonj at 4/15/2004 4:21:02 AM
H
I want to make an ascx control with a DataGrid on it and make its bindings generic by using an ascx control, is there any way I can give each ascx control its own 'properties', like I want to make each instance of it a different forecolor, and I also want to give each one a different dataset (alt... more >>
Nice textBox w/built in validation problem
Posted by Chad at 4/15/2004 12:21:30 AM
Attached is an article on how to create a textbox control with built in =
validation. See =
http://www.codeproject.com/aspnet/SelfValidatingTextBox2.asp?df=3D100&for=
umid=3D33309&select=3D792375
Check it out. Any help would be greatly appreciated. You might even =
value the control discussed... more >>
textbox
Posted by spy at 4/14/2004 5:15:26 PM
i would like modify font texybox in verdana in onpage_load
textbox.font=?
... more >>
Adding click event to generic control?
Posted by Stephen Lambie at 4/14/2004 1:13:39 PM
Hi,
I want to develop a custom checkbox. I want to use the existing checkbox
in a custom control where I use the disabled state as a third state. I
need to be able to detect mouse or click events in the disabled checkbox
or the parent custom control.
Is this possible? How does a contro... more >>
What is the life cycle when there are child controls?
Posted by pookiebearbottom NO[at]SPAM yahoo.com at 4/14/2004 11:01:55 AM
The basic life cycle is (hopefully I am correct):
OnInit
LoadViewState
LoadPostBackData* (loads controls with postback data)
OnLoad (form load)
RaisePostDataChangedEvent* (controls raise data change event
here)
RaisePostBackEvent* (controls rais... more >>
Validator and custom control question
Posted by Henk at 4/13/2004 4:37:42 PM
Hello,
I have a custom control that overrides the base class render method. From
the Render method I got a call to the follwing method in the code snippet
below, problem is that the textbox gets rendered, but not the validator,
it's simply only leaving a span in the html page which prints the
... more >>
Where did my ViewState go???
Posted by snichols NO[at]SPAM cyscript.com at 4/13/2004 2:11:06 PM
I'm trying to build serval custom controls and I'm havinig trouble
maintaining their viewstate. So I wanted to back it up to the most
basic level - and now I'm more confused than ever.
I have a web form where I've overridden two methods:
Protected Overrides Function SaveViewState() As Object... more >>
Referencing Dynamically created controls
Posted by Chris Kennedy at 4/12/2004 8:18:16 PM
Can anyone tell me how to reference a a control, e.g. a control I have added
to the controls collection without specifically naming it. Also can anyone
give me some pointer on how to attach events to them. Regards.
... more >>
dropdownlist postback to user control
Posted by DC Gringo at 4/12/2004 3:55:23 PM
Using code-behind, I have a page "index.aspx" that has a user control
mainHeader.ascx (with a language selection dropdownlist).
Upon selecting a language from the dropdownlist, it should post back
OnSelectedIndexChanged to a Sub "languageSelect" in the index.aspx.vb
code-behind. The variable ... more >>
A Control with Scroll Bar??
Posted by Malik Asif Joyia at 4/12/2004 3:49:01 PM
Hello,
i want to make a server control for my ASP.NET page which should have =
its own window in the page and should have scroll bar and should be =
capable of containing html in it.=20
any one if can guide, i will be very thankfull to him.......
thanks
Software Developer
Chemmed Co... more >>
Multiple select listbox values in query
Posted by DC Gringo at 4/11/2004 10:31:02 PM
I have two listboxes, the first of which is an autopostback=true that allows
multiple row selection. When I select multiple values (by holding down CTL)
in the first one, it should query the second one. I seem unable to do this
as it only sends back the first item I select whether I have the CT... more >>
could not load type
Posted by john at 4/10/2004 7:46:03 PM
Hi,
I tried with "Developing a Simple ASP.NET Server Control" from MSDN a
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconwalkthroughdevelopingsimplewebformscontrol.asp
But I saw "Error Creating Contro - Firstcontrol1" at the design tim
and when I try to run ... more >>
|