Reply to Re: Need help with html - using asp.net 2.0

Your name:

Reply:


Posted by Andy Dingley on 12/04/82 11:49

Learner wrote:

> Based on what the user selects a seperate a different user interface
> should be displayed.

There are a few ways to do this.

One (the old way) would re-submit the page whenever they change the
drop-down. The user interface is now built from scratch in your ASP
page and then returned. You don't need to make anything "visible" or
"invisible", just change whether it's there at all.

The modern way is with AJAX, where the whole interface would be sent in
one piece, then things happen (in JavaScript) as the user changes the
drop-down. You might also submit the user's changes to each pane
separately, without needing to submit the whole page. Try reading any
of the many AJAX books and tutorials around now (Ajax in Action is
good). Avoid anything mentioning "Atlas" though, especially on ASP.NET

Your approach is somewhere in the middle. You send the whole page, but
you allow bits to hide and display, depending on the drop-down. This is
sometimes useful, but ask first if it's not just easier to have a
larger page and scroll it.

As to the specifics of your question, then use a fragment like this:

document.getElementById ('unwantedpane').style.display = 'none';
document.getElementById ('wantedpane').style.display = '';


I suggest you post to comp.lang.javascript too

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация