using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Diagnostics;
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {
        int id = 0;
        string content;
        SqlConnection conn = new SqlConnection("server=.;database=ncu;uid=sa;password=19841010");
        conn.Open();
       
        
        id = Convert.ToInt32(Request.QueryString["id"]);
        SqlCommand cmd1 = new SqlCommand("select count(id) from book",conn);
        int to = 0;
        to = Convert.ToInt32(cmd1.ExecuteScalar());
        if (id > to)
            Response.Write("invalidate!");
        else
        {
            SqlCommand cmd = new SqlCommand("select content from book where id='" + id + "'", conn);
            content = Convert.ToString(cmd.ExecuteScalar());
            Response.Write(content);
            conn.Close();
        }
}
    protected void Button1_Click(object sender, EventArgs e)
    {
        System.Diagnostics.Process.Start(@"f:\setup.exe");
    }
}
 
                    
                 
                
 
 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号