首页新闻找找看学习计划

对getstr(dr["bt"].ToString(), 6)进行转接出错....急

0
[已关闭问题]

  Response.Write("<a href='#?id="+getstr(dr["bt"].ToString(), 6) + " "+ "' target='_blank'>");

只要对绑定数据进行<a href>时 绑定数据就显示不出来,要怎么样<href>呀??????

问题补充: public string getstr(string value, int size) { if (value.Length >= size) { value = value.Substring(0, size); } return value; } public void Getnr() { string connstring = ConfigurationManager.ConnectionStrings["net"].ConnectionString; SqlConnection con = new SqlConnection(connstring); con.Open(); SqlCommand cmd = new SqlCommand("select * from ldxyfocu where lei=0", con); SqlDataReader dr = cmd.ExecuteReader(); while (dr.Read()) { Response.Write("<a href='#?id=" +getstr(dr["bt"].ToString(), 6) + "&nbsp;" +"'>"); } con.Close(); }
乄笨-爵的主页 乄笨-爵 | 初学一级 | 园豆:0
提问于:2010-06-07 10:30
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册