473,386 Members | 1,621 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Custom Control - Design Time Support

I am creating a custom control which is a form generator. Basically you
define some parameters, and it will build input control (textbox), tooltip,
validation code etc in one swoop.

Something such as:
1 <tt:DataForm ID="DataForm1" runat="server">
2 <Columns>
3 <tt:DataColumn ID="FirstName" runat="server"
AllowDottedDecimal="False" AllowDottedHex="False"
4 AllowDottedOctal="False" AllowHybrid="False"
AllowIPv6="False" AllowTerritories="False"
5 Exponent="False" Format="" Fractional="False"
InvalidMessage="" Label="First Name" Lowercase="False"
6 MissingMessage="" RegExp="" Required="True" Scheme="False"
Signed="False" Trim="False"
7 UCFirst="False" Uppercase="False"
ValidationType="ValidationTextbox" Value="">
8 </tt:DataColumn>
9 <tt:DataColumn ID="LastName" runat="server"
AllowDottedDecimal="False" AllowDottedHex="False"
10 AllowDottedOctal="False" AllowHybrid="False"
AllowIPv6="False" AllowTerritories="False"
11 Exponent="False" Format="" Fractional="False"
InvalidMessage="" Label="Last Name" Lowercase="False"
12 MissingMessage="" RegExp="" Required="True" Scheme="False"
Signed="False" Trim="False"
13 UCFirst="False" Uppercase="False"
ValidationType="ValidationTextbox" Value="">
14 </tt:DataColumn>
15 </Columns>
16 </tt:DataForm>

So lets pretend your form has 30 columns. It will create 30 textbox's based
on the parameters you set etc.

I am new to ASP.NET so please bare with me. I have all this working
currently. My main issue is, if a developer is using my form generator, how
do they access those inputs in the postback?

Sure they can do dataForm.FindControl("something"); 30 times and then if
textbox, if combobox, build SQL for insert/update etc. But this seems very
ugly to me.

How can I make the TextBox's that my control generates based on the
parameters visible to the designer so someone can do something such as:
Text1.Text in the postback codebehind?

I am positive designer interface of some sort can help here but I am not
very experienced. I have only done some basic designer stuff like
CollectionEditor's etc.

Any help would be greatly appreciated.

Thanks and take care.

Jan 24 '07 #1
0 1043

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: SammyBar | last post by:
Hi, I'm trying to bind a custom collection class to a data grid, following the guidelines from the article http://msdn.microsoft.com/msdnmag/issues/05/08/CollectionsandDataBinding/default.aspx....
7
by: Martin Schulze | last post by:
Hello, i tried to compose myself a custom usercontrol which is derieved from System.Windows.Forms.UserControl. It contains 2 comboboxes and one textbox (which are also custom controls, but...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
3
by: George Jordanov Ivanov | last post by:
Folks, I am implementing a WebUserControl, which will have its own custom event StateChanged. Now, I want to add this event to the Events tab in the control properties, so that the users of my...
4
by: Charles Zhang | last post by:
I created a custom server control whose rendering logic relies on session variables and cookies. It works just fine at run time. The problem is at the design time, because session variables and...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
1
by: Mark Olbert | last post by:
Has anyone else noticed that the design-time support for databinding in custom controls in ASPNET2 sucks? At least for GridViews? So far I've spent going on two days trying to get the following...
5
by: TS | last post by:
I have a custom textbox that i need to access a label's text property. the label and textbox are 2 separate controls that will be on my page. Inside my custom control i want to have access to this...
5
by: gerry | last post by:
I am trying to create a custom container control that will only ever contain a specific type of control. At design time, when a control of a different type is added to the container I would like...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.