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

Need a suggestion. User control or Web Form?

Hi,

The system that I'm building has some conditions, which will tell me
which page to show at that time.

My first thought was to have a table of controls in my DB, which will
have a column for the path of a control. This way, a web form would
query the table to know which control it has to load.
However, I gave it a second thought, because in theory, one must use
user controls, only when you are going to re-use it somewhere else (not
my case). That is why I need to know, if instead of having user
controls, I should instead use web forms (my DB table would still be
the same, with the path to the web form), and instead of having a web
form which loads the control, I would simply do a Redirect to the web
form that resulted from my query.

I just want to know if my first option of using user controls is poor
design (because, they are not being re-used) and is better to just use
web forms. Or is having user controls, and not re-using them not really
poor design. What do you suggest?

Thanks

Nov 19 '05 #1
1 1166
I've tried the user control approach you proposed before, and I must say it
really didn't work out very well for a variety of reasons.
I'd say you should go for more of a Front Controller design pattern and
redirect the user to the appropriate page based on the current state.

Here's more info:
http://msdn.microsoft.com/library/en...asp?frame=true

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Hugo Flores" <hu*********@ge.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Hi,

The system that I'm building has some conditions, which will tell me
which page to show at that time.

My first thought was to have a table of controls in my DB, which will
have a column for the path of a control. This way, a web form would
query the table to know which control it has to load.
However, I gave it a second thought, because in theory, one must use
user controls, only when you are going to re-use it somewhere else (not
my case). That is why I need to know, if instead of having user
controls, I should instead use web forms (my DB table would still be
the same, with the path to the web form), and instead of having a web
form which loads the control, I would simply do a Redirect to the web
form that resulted from my query.

I just want to know if my first option of using user controls is poor
design (because, they are not being re-used) and is better to just use
web forms. Or is having user controls, and not re-using them not really
poor design. What do you suggest?

Thanks

Nov 19 '05 #2

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

Similar topics

9
by: CW | last post by:
I wrote an HTML based chat application. The front end is built entirely on HTML + javascript. Essentially, I have a hidden frame that's refreshed frequently and any new messages are displayed in...
19
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate...
2
by: New2Access | last post by:
Access newbie here with what's probably a complicated question. I've been tasked with developing a simple budgeting application using MS Access for my UI. I'm not an Access developer by trade but...
2
by: andy | last post by:
I have user controls(.ascx) programmed to function as modules on the same page - default.aspx. As you would be well aware, default.aspx has the normal html stuff:- <%@ Page language="c#"...
1
by: Robert W. | last post by:
I have a 'Controller' object that manages the interaction between its two children: a Form and a DataObject. I've written specialized code in the Controller to control how the Form updates the...
6
by: Steve Booth | last post by:
I have a web form with a button and a placeholder, the button adds a user control to the placeholder (and removes any existing controls). The user control contains a single button. I have done all...
8
by: **Developer** | last post by:
I have a control called MyPanel that inherits from Panel. Also a control called MyRTB that inherits from RichTextBox. They are used on a form as follows: MyPanel in on the form and MyRTF is...
8
by: | last post by:
The problem lies here eval("document.TeeForm.amt.value(S+M)"); S and M suppose to add up and the total suppose to appear on the AMT field but it didn't. Any help? ...
9
by: Jonathan Wood | last post by:
Greetings, My app displays users in a GridView control. I'd like to have the name field shown in each row of this control a link that displays another page with information about that user. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.