Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   How to dynamically create controls on the client (http://www.velocityreviews.com/forums/t773777-how-to-dynamically-create-controls-on-the-client.html)

Luke Breuer 07-12-2004 03:57 PM

How to dynamically create controls on the client
 
I am in charge of writing a criteria selection page for queries. There
is the potential for a hundred or even hundreds of fields. Since we
want to display a decent amount of controls/data for each field, this
would quickly eat up space if all the controls were generated at the
server and sent to the client. Currently we have a setup like this
that requires a 500 KB download - absolutely unacceptable.

I would like to know if it's "kosher" or even possible to send the
user a list of the fields, their datatypes, etc., along with a piece of
javascript that will create the controls on the client side. If it is
at all possible, I would like to encapsulate this functionality so the
code-behind can access something simple like an Items collection to see
all the controls that were added.

The reason I want all the controls loaded at once is that roundtrips to
the server would take an noticeable amount of time that would be nice
if it could avoided.

Thanks in advance,
Luke Breuer


kw 07-12-2004 05:07 PM

Re: How to dynamically create controls on the client
 
If you are going to go that route, you could also consider using a Windows
app. The 500k still has to be downloaded, but you should make sure it's
downloaded only once by specifying a js file that loads the control data.
Another solution would be to break the problem up; using a TabStrip that
either dynamically loads all the content (via ASP.NET) or just loads
references to a separate js file.

"Luke Breuer" <labreuer@gmail.com> wrote in message
news:ccucdn$k7i@odak26.prod.google.com...
> I am in charge of writing a criteria selection page for queries. There
> is the potential for a hundred or even hundreds of fields. Since we
> want to display a decent amount of controls/data for each field, this
> would quickly eat up space if all the controls were generated at the
> server and sent to the client. Currently we have a setup like this
> that requires a 500 KB download - absolutely unacceptable.
>
> I would like to know if it's "kosher" or even possible to send the
> user a list of the fields, their datatypes, etc., along with a piece of
> javascript that will create the controls on the client side. If it is
> at all possible, I would like to encapsulate this functionality so the
> code-behind can access something simple like an Items collection to see
> all the controls that were added.
>
> The reason I want all the controls loaded at once is that roundtrips to
> the server would take an noticeable amount of time that would be nice
> if it could avoided.
>
> Thanks in advance,
> Luke Breuer
>





All times are GMT. The time now is 05:10 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.