Detailed_info.aspx.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

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;

public partial class Detailed_info : System.Web.UI.Page
{
    string str = System.Configuration.ConfigurationManager.AppSettings["str_con"].ToString(); //连接数据库

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) { 
         string hero_name = Request.QueryString["hero_name"].ToString();
        SqlConnection con = new SqlConnection(str);

        string str_sql = "SELECT [dbo].[Skill_Info].[Hero_name],[img_sk_01],[img_sk_02],[img_sk_03] ,[img_sk_04],[img_sk_05],[skill_name_01]"+
       ",[skill_name_02] ,[skill_name_03],[skill_name_04],[skill_name_05] ,[skill_xx_01] ,[skill_xx_02] ,[skill_xx_03]"+
       ",[skill_xx_04],[skill_xx_05],[video],[you_skills_01],[you_skills_02],[you_skills_03],[enemy_skill_01],[enemy_skill_02],[enemy_skill_03]" +
       ",[dbo].[英雄信息表].英雄名称,[backgr_story],[photo],[photo_XQ],[photo_XQ_01],[photo_XQ_02],[photo_XQ_03]" +
       "FROM [dbo].[Skill_Info],[dbo].[英雄信息表] "+
       "where [dbo].[Skill_Info].Hero_name = [dbo].[英雄信息表].英雄名称  and 英雄名称='" + hero_name + "'";
        con.Open();
        SqlDataAdapter da = new SqlDataAdapter(str_sql, con);
        DataSet ds = new DataSet();
        da.Fill(ds);
        FormView1.DataSource = ds;
        FormView1.DataBind();
        con.Close();
        }

        Label lb1 = FormView1.FindControl("Label4") as Label;
        Label lb2 = FormView1.FindControl("Label5") as Label;
        Label lb3 = FormView1.FindControl("Label6") as Label;
        Label lb4 = FormView1.FindControl("Label7") as Label;
        Label lb5 = FormView1.FindControl("Label8") as Label;
        TextBox t1 = FormView1.FindControl("TextBox1") as TextBox;
        TextBox t2 = FormView1.FindControl("TextBox2") as TextBox;
        TextBox t3 = FormView1.FindControl("TextBox3") as TextBox;
        TextBox t4 = FormView1.FindControl("TextBox4") as TextBox;
        TextBox t5 = FormView1.FindControl("TextBox5") as TextBox;

        lb1.Visible = false;
        lb2.Visible = false;
        lb3.Visible = false;
        lb4.Visible = false;
        lb5.Visible = false;
        t1.Visible = false;
        t2.Visible = false;
        t3.Visible = false;
        t4.Visible = false;
        t5.Visible = false;
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        Label lb1 = FormView1.FindControl("Label4") as Label;
        TextBox t1 = FormView1.FindControl("TextBox1") as TextBox;
后面还有 41 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。