visual stdio 2008 C# SQL 2005下面几句代码。求哪位大神给解释一下吧。跪求 一定采纳
逐行的功能作用解释一下,承诺好的一定采纳protectedvoidbtnSearch_Click(objectsender,EventArgse){Session["to...
逐行的功能作用解释一下,承诺好的一定采纳
protectedvoidbtnSearch_Click(object sender, EventArgs e)
{
Session["tool"] ="新闻->站内查询("+this.ddlStyle.SelectedValue.Trim() +")----输入关键字为""+this.txtKey.Text.Trim() +""";
string strSql ="select * from tb_News where style='"+this.ddlStyle.SelectedValue.ToString() +"'";
strSql +=" and (( content like '%"+this.txtKey.Text+"%')";
strSql +=" or (Title like '%"+this.txtKey.Text+"%'))";
//strSql += "and issueDate='" + DateTime.Today.ToString() + "'";
Session["search"] = strSql;
Response.Redirect("search.aspx"); 展开
protectedvoidbtnSearch_Click(object sender, EventArgs e)
{
Session["tool"] ="新闻->站内查询("+this.ddlStyle.SelectedValue.Trim() +")----输入关键字为""+this.txtKey.Text.Trim() +""";
string strSql ="select * from tb_News where style='"+this.ddlStyle.SelectedValue.ToString() +"'";
strSql +=" and (( content like '%"+this.txtKey.Text+"%')";
strSql +=" or (Title like '%"+this.txtKey.Text+"%'))";
//strSql += "and issueDate='" + DateTime.Today.ToString() + "'";
Session["search"] = strSql;
Response.Redirect("search.aspx"); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询