raeisy_f
جمعه 30 اردیبهشت 1390, 14:12 عصر
با سلام و ضمن تشکر از زحمات تمام دوستان سوال در رابطه با fckeditor داشتم .
من برای درج خبر از fckeditor به این صورت استفاده نموده ام .
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
//oFCKeditor.BasePath = sBasePath;
oFCKeditor.BasePath = '../fck/';
oFCKeditor.Height = 300 ;
oFCKeditor.width = 800 ;
oFCKeditor.Value = '' ;
oFCKeditor.Create() ;
</script>
و از طریق request.form("fckeditor1") متن موجود در fckeditor را در جدول خبر tblnews اضافه نموده ام . حال جهت ویرایش خبر یعنی چناچه بخواهم متن موجود در فیلد content (خبر) را در fckeditor جهت ویرایش نمایش دهم بایستی با چه دستوری این کار را انجام دهم .
در قطعه کد زیر به جای fckeditor با توجه به نحوه ایجاد fckeditor ی که من استفاده نموده ام چه دستوری را بنویسم .
Using con As New SqlConnection(ConfigurationManager.ConnectionStrin gs("Con").ConnectionString)
Dim cmd As New SqlCommand("select * from TblNews where NewsID=@newsid", con)
cmd.Parameters.AddWithValue("@newsid", newsid)
con.Open()
Dim dr As SqlDataReader = cmd.ExecuteReader()
dr.Read()
txtTitle.Text = dr("Title").ToString
txtAbstract.Text = dr("Abstract").ToString
txtpagenames.Text = dr("PageName").ToString
fudPic.ToolTip = dr("pic").ToString
fckeditor= dr("Contents").ToString
textContent.Text = StripHTMLTags(dr("Contents").ToString())
con.Close()
End Using
من برای درج خبر از fckeditor به این صورت استفاده نموده ام .
<script type="text/javascript">
var oFCKeditor = new FCKeditor( 'FCKeditor1' ) ;
//oFCKeditor.BasePath = sBasePath;
oFCKeditor.BasePath = '../fck/';
oFCKeditor.Height = 300 ;
oFCKeditor.width = 800 ;
oFCKeditor.Value = '' ;
oFCKeditor.Create() ;
</script>
و از طریق request.form("fckeditor1") متن موجود در fckeditor را در جدول خبر tblnews اضافه نموده ام . حال جهت ویرایش خبر یعنی چناچه بخواهم متن موجود در فیلد content (خبر) را در fckeditor جهت ویرایش نمایش دهم بایستی با چه دستوری این کار را انجام دهم .
در قطعه کد زیر به جای fckeditor با توجه به نحوه ایجاد fckeditor ی که من استفاده نموده ام چه دستوری را بنویسم .
Using con As New SqlConnection(ConfigurationManager.ConnectionStrin gs("Con").ConnectionString)
Dim cmd As New SqlCommand("select * from TblNews where NewsID=@newsid", con)
cmd.Parameters.AddWithValue("@newsid", newsid)
con.Open()
Dim dr As SqlDataReader = cmd.ExecuteReader()
dr.Read()
txtTitle.Text = dr("Title").ToString
txtAbstract.Text = dr("Abstract").ToString
txtpagenames.Text = dr("PageName").ToString
fudPic.ToolTip = dr("pic").ToString
fckeditor= dr("Contents").ToString
textContent.Text = StripHTMLTags(dr("Contents").ToString())
con.Close()
End Using