private void CbUseRawCheckedChanged(object sender, EventArgs e)
{
if (cbUseRaw.Checked)
{
txtRawContent.Text = txtContent.Text;
var cookie = new HttpCookie(RawEditorCookie, "1") { Expires = DateTime.Now.AddYears(3) };
Response.Cookies.Add(cookie);
}
else
{
txtContent.Text = txtRawContent.Text;
if (Request.Cookies[RawEditorCookie] != null)
{
var cookie = new HttpCookie(RawEditorCookie) { Expires = DateTime.Now.AddYears(-3) };
Response.Cookies.Add(cookie);
}
}
txtRawContent.Visible = cbUseRaw.Checked;
txtContent.Visible = !cbUseRaw.Checked;
// Response.Redirect(Request.RawUrl);
}