Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Show More" details link

Status
Not open for further replies.

csutton

Programmer
Dec 27, 2000
213
US
Hi, I'm using MS Visual Web Developer 2008 Express and have a page that is linked to a database. I am using a DataList control, and would like to have a link in each record that says "Show More Details..." that when they click, will dropdown a hidden panel or something showing all of the details for that record.

Example:

Class Name: Test Class
Start Date: 1/1/2009
Cost: $45.00
(link)Click more for details...
(the following only shows when clicked and hidden when hide is clicked)
-----
Date 2: 1/2/2009
Description: You will learn something here etc etc
(link)Hide
-----

then the next record would appear.

Any ideas how I go about doing this? A link or step by step process would be awesome. Thank you!!

Chris

Chris Sutton
 
using the template add a hyperlink control. set the url to something like a_new_page.aspx?id=xxx
A link or step by step process would be awesome.
this is web development 101. google for any number of examples.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks Joe, but I'm not looking for something that simple. I want the detailed information to display in a panel or something on the same page, where the detailed info displays between record 1 and 2. Kinda like an accordian.

Chris Sutton
 
that's a little more tricky, but it's all just html. this is real simple without webforms. it's not impossible with webforms, it's just not straight forward like it should be. the same principles apply. the minor change is loading the results into a modal popup.
jquery has thickbox and ms ajax has modal popup. I perfer jquery as it's small and easy to use. msajax works, but it's clunkier and has to deal with the page life cycle of things.

google examples of webforms modal popup form.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Whether you are using webforms or the MVC pattern it really doesn't matter as both are just as simple; you either:

1. Load all of the data up front to the client and toggle it with javascript.
2. Make a full trip back to the server, get the data and then write it back out
3. Use an AJAX based request to get the data when needed and update only the relevant section of the page

Mark,

[URL unfurl="true"]http://lessthandot.com[/url] - Experts, Information, Ideas & Knowledge
[URL unfurl="true"]http://mdssolutions.co.uk[/url] - Website Design
[URL unfurl="true"]http://aspnetlibrary.com[/url] - An online resource for professional ASP.NET developers
 
Thanks all! I guess I'll look to see how to just toggle it with javascript.. it won't be much data but I want the screen to look easy to read.. Thanks for the advice!

Chris Sutton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top