473,386 Members | 1,693 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.

Web Server Controls Templates - best practices

I am not sure if web server control templates are the way to go or not, but
I would like to get some opinions on the best way to go about this.

I have a web page where administrators will specify which users have access
to various reports. The page will display the report name and a list of
users who currently have access. The administrator will be able to add or
delete from this list of users, then save the results to the database.
Basically, I want to be able to add or remove items to this list on the
client side, and have the server recognize the additions. I would also like
to avoid postbacks to the server when not absolutely necessary.

I know how to do this with classic asp, but I am developing in .net and want
to do this the best way so others will have no trouble managing the code.

Should I be using repeaters, datalists, datagrids, or a completely different
approach?

Any advice that can be provided would be a huge help.

i.e.

Report Name: Monthly Financial Statement

Users:

John Doe
Susan Parker
Tom Clancy

<add user> <remove user> <save changes>
Feb 8 '06 #1
3 1201
Alot of people get really anxious about doing postbacks to the server.
Unless you will have 1000+ people accessing this at the sametime, the
load on your server is negligable. I have had many apps that I had to
do multiple postbacks and I have never had a problem.

I would make it so, when you click the "add user" button, it sends the
reportID, userID to the server and execute an "AddUserToReport" method.

In other words, process each addition of a user to a report, right when
that one user is added. This is going to require less code on the
server side and less headache for you. If you do it the other way, you
will have to store a collection of values in the clients session, then
when they click "save changes" you'll have to iterate through the
collection and do multiple database calls anyways.

Just a suggestion, I always try to take the route that requires me to
code less, because thats less code to maintain later on, and easier to
read code.

my 2cents

Feb 8 '06 #2
Thanks.
This particular app will only have a handful of users, so the added network
traffic should be negligible.

What would you recomend using a control template, building the user list
with a loop, or some other method?

"DKode" <dk****@gmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
Alot of people get really anxious about doing postbacks to the server.
Unless you will have 1000+ people accessing this at the sametime, the
load on your server is negligable. I have had many apps that I had to
do multiple postbacks and I have never had a problem.

I would make it so, when you click the "add user" button, it sends the
reportID, userID to the server and execute an "AddUserToReport" method.

In other words, process each addition of a user to a report, right when
that one user is added. This is going to require less code on the
server side and less headache for you. If you do it the other way, you
will have to store a collection of values in the clients session, then
when they click "save changes" you'll have to iterate through the
collection and do multiple database calls anyways.

Just a suggestion, I always try to take the route that requires me to
code less, because thats less code to maintain later on, and easier to
read code.

my 2cents

Feb 8 '06 #3
if you are talking about what method to use to populate the usercontrol
with the list of users that have access to that report, I personally
would use a datagrid, query your database to get a dataset of the users
for that report, then bind the datatable to the datagrid. then perhaps
put in a checkbox column in the datagrid, checking off users that
already have access, then as someone clicks a checkbox to add a user to
the report, attach the checkbox event and add ur code to add the user
to the database in the event handler for the checkbox.

there is always lots of different ways of solving a problem, but at
first glance and from what you described, this is the method I would
take. You might have other requirements in there that i'm not aware of.

Feb 8 '06 #4

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

Similar topics

0
by: asj | last post by:
luke: BORRRRRRRRING......the most interesting initiatives are happening on the client side - in small wireless devices such as cellphones and smartphones, where J2ME has become the de facto...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
3
by: Todd | last post by:
Hello, I'm looking for a book with in-depth coverage of developing server controls, particularly custom controls. Ideally, the book would have a good amount of how-to's and best practices, but...
3
by: Ken Varn | last post by:
I am just starting the process of creating ASP.NET server controls. I have created controls for .NET applications, but have just started with ASP.NET. I am a little confused about some areas that...
3
by: Leo J. Hart IV | last post by:
OK, here's another question for the experts: I am building a multi-step (3 steps actually) form using a panel for each step and hiding/displaying the appropriate panel/panels depending on which...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
3
by: Jon Paal | last post by:
how do I load controls to the templates for the DataList control. <asp:datalist id="dl1" runat="server" > <ItemTemplate> " how to load control(s) here ????" </ItemTemplate>...
3
by: Mukesh | last post by:
Hi all As per my earlier conversation with Ciaran (thx for reply) I have installed the MS APplication block on the server , when i ran Build Enterprise Library file and Install Services from...
4
by: sean_mcad | last post by:
We are starting to standardize what we have been doing with our web applications and I have a “cost-benefit” question when it comes to some server controls. Main two examples is Plain text...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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.