做一个个人博客系统,编辑文章功能很郁闷,用的是 ckediter编辑器。修改文章时 修改了  文章后(用的是 textbox控件) 提交,死活修改不了,用一个msgbox测试后发现内容竟然没变如下图:我用的 SqlDataSource做的提交SqlDataSource12.UpdateParameters.Clear()
SqlDataSource12.UpdateCommand = "update soft_body set p_title='" + TextBox1.Text.ToString + "', p_keywd='" + TextBox3.Text.ToString + "', p_fl='" + DropDownList1.SelectedValue.ToString + "', p_time='" + TextBox2.Text.ToString + "', p_text='" + i_content0.Text.ToString + "', p_zy='" + i_content.Text.ToString + "', p_zz='" + DropDownList2.SelectedValue.ToString + "', p_zt='" + DropDownList3.SelectedValue.ToString + "' where ( id='" + Session("arl_id").ToString + "') "
        SqlDataSource12.Update()
啥原因?

解决方案 »

  1.   

    明明删的就剩几个字了。提交代码如下:
    Protected Sub Button3_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button3.Click
    MsgBox(i_content.Text.ToString)
    SqlDataSource12.UpdateParameters.Clear()
    SqlDataSource12.UpdateCommand = "update mywww_colorfulsoft_body set p_title='" + TextBox1.Text.ToString + "', p_keywd='" + TextBox3.Text.ToString + "', p_fl='" + DropDownList1.SelectedValue.ToString + "', p_time='" + TextBox2.Text.ToString + "', p_text='" + i_content0.Text.ToString + "', p_zy='" + i_content.Text.ToString + "', p_zz='" + DropDownList2.SelectedValue.ToString + "', p_zt='" + DropDownList3.SelectedValue.ToString + "' where ( id='" + Session("arl_id").ToString + "') "
    SqlDataSource12.Update()
    Response.Redirect("czwc.aspx")
        End Sub
    结果 msgbox 里面 还是完整的内容