This article for you to share the implementation of a small click based on jquery display large image results for your reference, the specific contents are as follows
Displays the following effects :
Clicking on any picture will show a larger image :
1. Front interface
<%@ Page language= "C #" autoeventwireup= true "codebehind=" WebForm1.aspx.cs "inherits=" practice. WebForm1 "%> <! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
2, background code
Using System;
Using System.Collections.Generic;
Using System.Linq;
Using System.Web;
Using System.Web.UI;
Using System.Web.UI.WebControls;
Using System.Data.SqlClient;
Using System.Data;
Using System.Text; Namespace exercise {public partial class WebForm1:System.Web.UI.Page {protected void Page_Load (object sender, EventArgs e) {if (!
IsPostBack) {loaddata (); } private void LoadData () {String constr = ' data source=love-pc\\sqlexpresspc;initial catalog=boke;user Id=sa;
Password=admin "; using (SqlConnection conn = new SqlConnection (Constr)) {using (SqlCommand cmd =conn. CreateCommand ()) {Conn.
Open ();
Cmd.commandtext = "Select Bigimgurl,smallimgurl from T_photo";
SqlDataAdapter adapter = new SqlDataAdapter (cmd);
DataTable dt = new DataTable (); Adapter.
Fill (DT);
StringBuilder sb = new StringBuilder (); Sb.
Append ("<ul>"); for (int i = 0; i < dt. Rows.Count; i++) {sb. Append ("<a href=")+ dt. rows[i]["Bigimgurl"] + ">")//Tim Picture path SB.
Append ("<li>"); Sb. Append ("
The above is the entire content of this article, I hope to help you learn.