473,396 Members | 2,030 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,396 software developers and data experts.

Flexible UI

Ed
Hallo,

How to do such a thing:

I want to build an ASP.NET application and I want to keep
it so flexible how possible. So I want the APS.NET for
example to render the buttons according to some database
entry (in database I have something like
that "b1,b2,b8,b10" and this time our page has buttons
number 1, 2, 8, 10), and I want to by able at run time to
decide what functionality these buttons have (so the
database tells us that after clicking on b1 there will by
method m3 started, and so on). How can it by done? Of
course I'm looking for the easiest and most professional
way ;)

Best regars,
Ed
Nov 19 '05 #1
1 1022
Dynamic form generation is possible but does require some careful attention.

One way to add controls to a form is add a container object in design time
to your web form or user control.
There's an Add method that almost available in all the container type
controls in asp.net. For example, HTML and ASP Tables, placeholders, etc.
Use this control to dynamically add what ever server controls you want.

But the trick is the event handler wire up. You'd have to wire the event
hanlder methods to the events every time a page is loaded for a dynamically
added control.

If you are using C# look at the InitializeComponent method. You should have
a event handler wire up to a method for atleast the page Load event. That
should give you an idea of how to manually wire the events.

HTH,
Suresh.

"Ed" wrote:
Hallo,

How to do such a thing:

I want to build an ASP.NET application and I want to keep
it so flexible how possible. So I want the APS.NET for
example to render the buttons according to some database
entry (in database I have something like
that "b1,b2,b8,b10" and this time our page has buttons
number 1, 2, 8, 10), and I want to by able at run time to
decide what functionality these buttons have (so the
database tells us that after clicking on b1 there will by
method m3 started, and so on). How can it by done? Of
course I'm looking for the easiest and most professional
way ;)

Best regars,
Ed

Nov 19 '05 #2

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

Similar topics

0
by: Punky | last post by:
Hi all, I've gotten a long way with my application, but now it's generating an error to which I know no response. I hope any of you can (and will) help me. Below is the code. It's a simple piece...
1
by: BoĆĄtjan Jerko | last post by:
Is there a way to pass list with flexible length to C extension? I want to pass flexible length list of floats to method and just can't get info if it is possible and how to do it. Thanks, B.
58
by: Jeff_Relf | last post by:
Hi Tom, You showed: << private const string PHONE_LIST = "495.1000__424.1111___(206)564-5555_1.800.325.3333"; static void Main( string args ) { foreach (string phoneNumber in Regex.Split...
10
by: Adam Warner | last post by:
Hi all, With this structure that records the length of an array of pointers as its first member: struct array { ptrdiff_t length; void *ptr; };
2
by: Christopher Benson-Manica | last post by:
Is the following program conforming under C99? #include <stdio.h> typedef struct foo { int bar; int baz; } foo; foo foos={
2
by: DevarajA | last post by:
Can someone help me understand what flexible array members exactly are, how they behave and how could them be implemented by a i386? Also I didn't understand the two exceptions that the standards...
0
by: athos | last post by:
Hi guys, Got a problem now :( please help... now we got a project handling records saved in a table in a sql 2000(will upgraded to 2005 soon) server. every month around a million records will...
8
by: ulyses | last post by:
I'm trying to put pointer to flexible array of structures in other structure. I want to have pointer to array of pixels in screen structure. Here is mine code, but I think it isn't quite all right:...
20
by: mechanicfem | last post by:
I thought (as they're in c99) that flexible arrays were there for a number of reasons - but I also thought they'd be great for stepping into structures (say) that were aligned in memory after (say)...
3
by: Hallvard B Furuseth | last post by:
to find the required alignment of a struct, I've used #include <stddef.h> struct Align_helper { char dummy; struct S align; }; enum { S_alignment = offsetof(struct Align_helper, align) };
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.