PDA

View Full Version : مشکل با نصب FCKeditor



masaioki.ono
دوشنبه 21 شهریور 1390, 19:10 عصر
سلام
من آموزش نصب FCKeditor رو از همین سایت به آدرس http://barnamenevis.org/showthread.php?197215-فیلم-های-آموزشی/page2 (http://barnamenevis.org/showthread.php?197215-فیلم-های-آموزشی/page2) گرفتم و دقیقا همون کارها رو انجام میدم اما یه مشکل داره موقعی که روی دکمه دارم کد ها رو می نویسم در خط دوم یعنی
db.news-table.insertonsubmit(new news-table{news = fckeditor1.value,news-id=textbox1.text}
);
تو همین خط مشکل دارم که به جا ی fckeditor1.value
CKEditor یا
CKEditorControl1 می یان که.value هم نمی شن
حالا وقتی همین جوری تمومش می کنم و برنامه اجرا می شه اصلا FCKeditor نمی یاد
عکسش رو گذاشتم که چی به جاش می یاد

fakhravari
جمعه 25 شهریور 1390, 00:56 صبح
از این کد استفاده کنید


<CKEditor:CKEditorControl ID="CKEditor1" runat="server" Height="80px"></CKEditor:CKEditorControl>

<script type="text/javascript">
CKEDITOR.replace( 'editor1',
{
fullPage : true,
extraPlugins : 'docprops'
});
</script>



try
{

SqlConnection connection = new SqlConnection(@"Data Source=.\SQLEXPRESS;Initial Catalog=Rahim;Integrated Security=True");
connection.Open();
SqlCommand cmd = new SqlCommand("insert into Coments " + "(name, Coments) values (@name,@Coments)", connection);
cmd.Parameters.Add("@name", TextBox1.Text);
cmd.Parameters.Add("@Coments", CKEditor1.Text.ToString());
cmd.ExecuteNonQuery();
connection.Close();
}
catch
{
Response.Write("Eror Post");
}
finally
{
Response.Redirect("Default.aspx");
}