This is my editmessage.aspx page.
<asp:FormView ID="FormView1" runat="server" DefaultMode="Edit" Height="218px"
Width="571px" OnItemUpdating="itemupdating">
<EditItemTemplate>
<FCKeditorV2:FCKeditor ID="FCKeditor1" BasePath="fckeditor/" runat="server"
Value='<%# Bind("Body") %>' >
</FCKeditorV2:FCKeditor>
<asp:LinkButton ID="button1" runat="server" CommandName="Update"
Text="Update">
</asp:LinkButton>
</EditItemTemplate>
</asp:FormView>
and this is code behind file. editmessage.aspx.cs
public SqlDataSource sqld1 = new SqlDataSource();
int msg_id;
string str;
protected void Page_Load(object sender, EventArgs e)
{
msg_id = Convert.ToInt32(Request.QueryString["id"].ToString());
txt.Text = msg_id.ToString();
sqld1.ConnectionString=
System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ToString();
str = "SELECT [ForumMessages].[MessageID] , [Body],[ForumMessages].[CreationDate] FROM [ForumMessages] WHERE [ForumMessages].[MessageID]=" + msg_id.ToString();
sqld1.SelectCommand = str;
FormView1.DataSource = sqld1;
FormView1.DataBind();
}
--------------------------------------------
All works fine.....But my problem is now i want to store the fckeditor value to database again when i click on update button.
What should i have to write in itemupdating event??
<asp:FormView ID="FormView1" runat="server" DefaultMode="Edit" Height="218px"
Width="571px" OnItemUpdating="itemupdating">
<EditItemTemplate>
<FCKeditorV2:FCKeditor ID="FCKeditor1" BasePath="fckeditor/" runat="server"
Value='<%# Bind("Body") %>' >
</FCKeditorV2:FCKeditor>
<asp:LinkButton ID="button1" runat="server" CommandName="Update"
Text="Update">
</asp:LinkButton>
</EditItemTemplate>
</asp:FormView>
and this is code behind file. editmessage.aspx.cs
public SqlDataSource sqld1 = new SqlDataSource();
int msg_id;
string str;
protected void Page_Load(object sender, EventArgs e)
{
msg_id = Convert.ToInt32(Request.QueryString["id"].ToString());
txt.Text = msg_id.ToString();
sqld1.ConnectionString=
System.Configuration.ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ToString();
str = "SELECT [ForumMessages].[MessageID] , [Body],[ForumMessages].[CreationDate] FROM [ForumMessages] WHERE [ForumMessages].[MessageID]=" + msg_id.ToString();
sqld1.SelectCommand = str;
FormView1.DataSource = sqld1;
FormView1.DataBind();
}
--------------------------------------------
All works fine.....But my problem is now i want to store the fckeditor value to database again when i click on update button.
What should i have to write in itemupdating event??