HighDots Forums  

Need help with html - using asp.net 2.0

alt.html alt.html


Discuss Need help with html - using asp.net 2.0 in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Learner
 
Posts: n/a

Default Need help with html - using asp.net 2.0 - 06-05-2006 , 10:05 AM






Hello Friends,
I have a drop down with 5 values in it and the drop down has the
below values

vin
year, make, model
Date range of grounded date
customer last name and account number


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

So keeping that in mind I have difined 4 Panels and put all their
visible property to False in .aspx page. and I am handlign the hiding
and display part base on the selection in the codebehind page.

This is how my table with the panels in the html page looks like

<Table>
<tr><td> Panel1 for vin</td></tr>
<tr><td> Panel2 for year, make, model</td></tr>
<tr><td> Panel3 for Date range of grounded date</td></tr>
<tr><td> Panel4 for customer last name and account number</td></tr>
</table>

But as its obivious I see a space of a particular panel is hiddern. I
mean If I select lastname, and account number in the drop down the page
displays space (as there 3 rows above the my selection). and also When
I select Year, make, model for some reason it doesn't display the model
text box and I only can Year and make labels and textboxes!

Is there a different to handle with hiding and unhiding panels? I have
no clue what a Div tag does if it could do a miracle.

Can any body help me with this.

Thanks
-L


Reply With Quote
  #2  
Old   
Andy Dingley
 
Posts: n/a

Default Re: Need help with html - using asp.net 2.0 - 06-05-2006 , 11:06 AM







Learner wrote:

Quote:
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



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.