Creating Slide Shows
Slide shows are a work of client-side programming where you dynamically update the content of the website. JavaScript is the main language that you should use. ASP.NET although can be able to work around with the client-side interactions. But using JavaScript is more efficient way of doing this.
Getting data from Database
First you need to make sure, that your database has the image names, saved in a table. If so, you can then continue to the next step, of extracting the stuff from the table. In ASP.NET you write the following code to get the data from a connected database.
var db = Database.Open("databaseName");
var selectQuery = "SELECT * FROM table_name";
var imageNames = db.Query(selectQuery);
This way, now the imageNames are present inside the
imageNames
variable. You can now populate a client-side variable through it. Or, you can generate a hidden list for the JavaScript to get the imageNames from.
Client side code
In the Client Side, you can use either JavaScript and do it yourself, or you can use some of the already built jQuery libraries to work with.
Some libraries that you can start working with.
- bxSlider[^] is a great jQuery library to work with these slideShow stuff in jQuery.
- WowSlider[^] is another plugin.
Note only these, Google is filled up with more of great stuff that you can add and use in your project. Before trying to create something, try to look for a solution that was already built.