Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 15th, 2008, 09:21 AM
Registered User
 
Join Date: Oct 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default hyperlinks in a dynamic drop down list

I have a dynamic dropdown list, that gets its titles from a database.
How can I make the titles in the list as hyperlinks to point to files on my root directory dynamically, so that the links are updated in the list when the database is updated?

Thanks

matti
 
Old October 15th, 2008, 10:31 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default

If I'm understanding you correctly, you can set AutoPostBack=True in the dropdown control and then write a sub that "Handles" the OnChange event to point to files in the root directory. The links in the dropdown will be updated every time the dropdown populates from the database.

<asp:DropDownList ID="ddlAreaID" AutoPostBack="True" Runat="server" />

   Private Sub ddlAreaID_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ddlAreaID.SelectedIndexChanged
           Do your pointing here although I don't understand exactly what you mean by "point". Do you mean open a file, read the contents of a directory, display a sample page from the book?
    End Sub








Similar Threads
Thread Thread Starter Forum Replies Last Post
drop down list values based on another drop down noor ASP.NET 1.0 and 1.1 Basics 3 July 5th, 2005 09:57 AM
Dynamic drop down list bart.moons Classic ASP Databases 9 January 25th, 2005 10:05 AM
dynamic search, images from database , hyperlinks ishh_sh VB How-To 0 December 15th, 2004 08:10 AM
Dynamic drop-down list lucian Dreamweaver (all versions) 2 July 8th, 2004 05:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.