protected void DetailsView2_DataBound(object sender, EventArgs e) { DetailsView myDetailsView = (DetailsView)sender; if(myDetailsView.CurrentMode == DetailsViewMode.Edit) { ((TextBox)myDetailsView.FindControl("date_time")).Text = DateTime.Now.ToString("d"); } }
还是不能给C_ID赋值,希望能和你联系!我的QQ:892113807
谢谢!在你的启发下我已解决!