all groups > asp.net building controls > september 2004
Filter by week: 1 2 3 4 5
custom validator and ControlToValidate in a composite control...
Posted by Donal McWeeney at 9/28/2004 5:14:10 PM
The ControlToValidate property is wrecking my head.
I have a custom composite server control defined as follows:
internal abstract class MyControlBase : Control, INamingContainer
{...}
[ValidationProperty("ValidationValue")]
internal class MyControl : MyControlBase
{...}
MyControl in ... more >>
Embeded Server Controls in a Custom Templated Control
Posted by James Hawes at 9/28/2004 5:06:11 PM
I have created a templated control. As far as the control is concerned I am
able to put any HTML inside each template. However, I can't seem to figure
out how to embed a server control to it. When I compile and run it shows
up, but I can't wire up any kind of event to it. I have searched a... more >>
adding a design time designerto a specific property
Posted by Angel at 9/28/2004 1:41:01 PM
I added an image property to my custom control. the property type i set at as
string because I want the url that is to be used for the control. How do I
set for this image property when the developer is in the properties window
and clicks to enter this value for the property, the ability to vi... more >>
How can I persist the state of a DropDownList control
Posted by nail at 9/27/2004 9:58:17 PM
Greetings,
I"m develop a custom control (render). It inherits a ListControl.
In the Render method, I apply an ArrayList to the DataSource property and
call the DataBind method.
So, how can I get the SelectIndexChanged event?
In other words, how can I know when the user change the dropdownlist... more >>
Getting variables from other controls & forms
Posted by Rock at 9/27/2004 12:04:46 PM
How do I get a value of a textbox control from a form?
On form1, I have a textbox with the value "CountyID" with a submit button;
when the user clicks on Submit, it goes to Form2.
How do I get the value of "countyID" (or whatever the user enters into the
textbox) to display on form2?
Some... more >>
Using .resx resources
Posted by cpnet at 9/26/2004 2:31:22 PM
I've built a ASP.NET control that stores some info (an XSLT transform) in a
..resx file in the assembly that also has the control. However, I've read
the following in MSDN documentation a few times, "Only .resources files
should be embedded in common language runtime assemblies and satellite
as... more >>
How to use "~" for approot
Posted by A Traveler at 9/25/2004 10:23:27 AM
Hello, i have a control i wrote which inherits from the ImageButton control.
On the ImageButton.ImageUrl property, you can use "~" to represent the root
of your application (vs. the domain root), so if my app resides @
www.myserver.com/myapp/ and i put in an image i can set its imageurl to
... more >>
Placement of Controls
Posted by et at 9/25/2004 9:32:15 AM
I have placed 3 web user controls on a page, a header, a navigation and a
products control. Each control is contained in a row and cell in a table.
The header and navigation controls work fine, but the products control is
displayed at the top of the page instead of inside the table. I have so... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How do I keep a control from initializing every time?
Posted by Carter at 9/24/2004 10:27:54 AM
I have a header control at the top of my default page. On this control
there are 4 buttons, each one displays a corresponding panel.
There also is a drop down list with a list of counties. The list of
counties is filled from a dataset when the page loads. The user selects a
county, and then... more >>
Datasets & Controls
Posted by Carter at 9/23/2004 11:42:36 AM
I have 5 controls on a page, each having it's own connection to a database
and different queries per control. Each control is displayed by the user
clicking on a menu. Simple enough.
However, because they are all on one page, each connection and dataset is
created when the first page is load... more >>
Repeater paging problem
Posted by Viktor Popov at 9/22/2004 11:28:34 AM
Hi,
I'm trying to do the following but I can't understand what's wrong. Could
you help me here!
I do paging with a Repeater like this:
DataSet ds = new DataSet();
dad.Fill(ds, "MyOffers");
if(ds.Tables[0].Rows.Count==0)
Delete.Enabled=false;
PagedDataSource objPds = new PagedDataS... more >>
Why can't I override RenderBeginTag?
Posted by lisa NO[at]SPAM starways.net at 9/22/2004 11:04:14 AM
I'm trying to make a custom control. I started off basing it on a
ListBox, but because of the bug in that control that prevents it from
rendering name/value pairs, I decided to use an HTMLSelect instead.
But when I changed it, I started getting an error:
Public Overrides Sub RenderBeginTag(... more >>
Determine if custom control is being added dynamically?
Posted by Donal McWeeney at 9/21/2004 2:57:28 PM
Hi,
Is it possible to determine in your custom control code if it is being added
to the control hierarchy through page parsing or being added dynamically via
code.
Thanks
Donal
... more >>
ShouldSerialize and method in WebControl
Posted by Victor Irzak at 9/20/2004 3:54:07 PM
Hello,
Why doesn't ShouldSerialise Method work in WebControl?
What is the best way to control the which attributes are serialized and
which once aren't
DefaultValue attribute in not enough.
Thanks
Victor
... more >>
Using Controls Caveats?
Posted by et at 9/18/2004 2:55:24 AM
I picked up a project that has been started with one form and about 20
controls, and am wondering if this is very practical. It seems to work
well; and is easy to follow. The form has a header with a menu, and each
item on the menu opens a panel with one or more controls on it.
I know in VB6... more >>
referencing controls in controls
Posted by DC Gringo at 9/15/2004 6:38:29 PM
I am a bit twisted and need some straightening out. I have a webform with 3
controls on it: a mainHeader, a sectionHeader with a label control contained
in the mainHeader, and a topHeadline.
In the topHeadline, I am retrieving a value with a stored procedure. I need
to set that value to a la... more >>
UserControl not capturing Button click event when loaded with PlaceHolder Control
Posted by gordingin NO[at]SPAM consiliumsoft.com at 9/15/2004 1:55:10 PM
My UI is one table, 2 colums, one row. The cell on the left has a tree
and the cell on the right has a placeholder control. When the user
clicks on a tree item, I dynamically load the apporopiate user control
into the PlaceHolder control using this code...
objPlaceHolder.Controls.Clear();
obj... more >>
controls getting values from another control---within a control
Posted by DC Gringo at 9/15/2004 12:22:10 PM
I am a bit twisted and need some straightening out. I have a webform with 3
controls on it: a mainHeader, a sectionHeader with a label control contained
in the mainHeader, and a topHeadline.
In the topHeadline, I am retrieving a value with a stored procedure. I need
to set that value to a la... more >>
Event handling in a Custom Tree control in ASP.Net and C3 web application
Posted by Subhasis Bilas via .NET 247 at 9/15/2004 11:44:35 AM
I have a Tree control for displaying folders list for a=
particular client in a Tree structure in a web application using=
Asp=2ENET and C#=2E Now i want to click on that tree control's=
Node(say Node1), then related files under that folder(Node=
containing Folder name)will be displayed unde... more >>
Server farm and fields of classes in session cache
Posted by cpnet at 9/14/2004 8:04:36 PM
I'm building some ASP.NET components, and I'd like them to function in a
server farm scenario. I have one class, "AppClass" that contains only
read-only data. I also have a second class, "SessionClass", that stores a
reference to an AppClass i.e:
SessionClass sc = new SessionClass();
sc.App... more >>
Detecting Null Values
Posted by Jordan at 9/13/2004 3:23:10 PM
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
... more >>
Dynamic Table Build Using DataRowView
Posted by hoosierprogrammer NO[at]SPAM yahoo.com at 9/13/2004 8:59:42 AM
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... more >>
In true, i need to pass a placeholder by param
Posted by nail at 9/10/2004 6:56:01 PM
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 con... more >>
Nested control in Web Custom Control and ViewState
Posted by rjordan NO[at]SPAM iai-online.com at 9/10/2004 1:29:30 PM
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 illu... more >>
Question on HTML and Web(Server Side) Controls
Posted by gordingin NO[at]SPAM consiliumsoft.com at 9/10/2004 11:52:11 AM
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 thi... more >>
non-createable base control?
Posted by Donal McWeeney at 9/10/2004 11:37:06 AM
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
... more >>
Run/design time packages
Posted by Peter Morris [Droopy Eyes Software] at 9/9/2004 8:37:05 AM
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 ".Design" assembly in which you place all of your
designe... more >>
Reacting to events of a composite controls
Posted by ree32 NO[at]SPAM hotmail.com at 9/8/2004 8:47:21 PM
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 linkbu... more >>
Compress/compact HTML during rendering
Posted by cpnet at 9/8/2004 7:29:43 PM
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 ... more >>
Composite controls not visible at design time
Posted by Peter Morris [Droopy Eyes Software] at 9/8/2004 7:18:13 PM
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 c... more >>
Problem creating DLL for a composite control
Posted by ree32 NO[at]SPAM hotmail.com at 9/8/2004 5:47:33 PM
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... more >>
Creating Menu controls on the fly
Posted by ree32 NO[at]SPAM hotmail.com at 9/7/2004 11:07:13 PM
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... more >>
How to make a menu component?
Posted by Luis Esteban Valencia at 9/7/2004 12:47:55 PM
I need to make a menu componen like this page www.f135.com
They made the menu on Javascript and I already have the code to make that
menu in javascript, but I want to make a menu so that the user can make any
nodes and subnodes.
This is the code in javascript, I want to put it in asp.net cont... more >>
Composite Control - Viewstate management for complex properties
Posted by gofishtn NO[at]SPAM hotmail.com at 9/7/2004 7:28:08 AM
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
managemen... more >>
Creating control dynamically
Posted by supak C via .NET 247 at 9/5/2004 11:26:47 PM
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... more >>
Tool Tip for DropDown list
Posted by Naveen at 9/5/2004 1:45:04 AM
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 proble... more >>
Web Custom Control - Retrieve Images from a Multifile Assembly
Posted by MLibby at 9/4/2004 7:31:01 AM
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 delete... more >>
Ignore literal content when parsing custom control children?
Posted by Donal McWeeney at 9/3/2004 3:22:04 PM
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 causi... more >>
Web Custom Control - Design Time Support ? ? ?
Posted by MLibby at 9/3/2004 3:19:02 PM
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... more >>
Annoying span
Posted by the_banski NO[at]SPAM hotmail.com at 9/2/2004 12:18:11 AM
Hi,
Ive a annoying problem when creating Custom WebControl.
When i create this sample control in codebehind. It renders as:
<span id="testctrl"><input name="testctrl:testctrl"
id="testctrl_testctrl" type="text" value="TestValue" /></span>
Why does it render <span> tags? How can I create it ... more >>
|