DataRowView DrView = (DataRowView)DetailsView1.DataItem;
DetailsViewRow DtView = DetailsView1.DataItem;
string ntitle = DrView[ "title "].ToString();
string ndname = DrView[ "dname "].ToString();
string ncontext = DrView[ "content "].ToString();
Response.Write(ntitle+ndname+ncontext);
Response.Write(ntitle);
为什么取不到DETAILSVIEW的值?
------解决方案--------------------------------------------------------
string webname = ((TextBox)DetailsView1.Rows[0].Cells[1].Controls[0]).Text.ToString();
string weburl = ((TextBox)DetailsView1.Rows[1].Cells[1].Controls[0]).Text.ToString();
这样取
------解决方案--------------------------------------------------------
FindControl这个方法