-
Notifications
You must be signed in to change notification settings - Fork 0
/
Create_Page.aspx.cs
executable file
·77 lines (67 loc) · 2.07 KB
/
Create_Page.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class Create_Page : System.Web.UI.Page
{
int PresentationID;
public string htmlCode = string.Empty;
protected void Page_Load(object sender, System.EventArgs e)
{
if (IsPostBack)
{
PresentationID = Convert.ToInt32(Request.QueryString.Get("id"));
}
else
{
// Put code to execute for non postback here
}
}
protected void BtnSave_Click(object sender, System.EventArgs e)
{
PreviewButton_Click(null, EventArgs.Empty);
Page pg;
pg = new Page();
pg.PageName = System.Convert.ToString(txtPageName.Text);
string UserSignature = TextPreview.InnerHtml;
pg.PageContent = HttpUtility.HtmlEncode(UserSignature);//Editor.Text;
pg.Ordinal = System.Convert.ToInt32(txtOrdinal.Text);
pg.PresentationID = System.Convert.ToInt32(PresentationID);
clspage.Insert(pg);
Response.Redirect("PresentationGridMaster.aspx", false);
}
protected void ClearButton_Click(object sender, EventArgs e)
{
Editor.Text = String.Empty;
}
protected void BtnCancel_Click(object sender, System.EventArgs e)
{
Response.Redirect("PresentationGridMaster.aspx", false);
}
protected void SaveButton_Click(object sender, EventArgs e)
{
DataStore.StoreHtml(Editor.Text);
}
protected class DataStore
{
public static void StoreHtml(string html)
{
}
}
protected void PreviewButton_Click(object sender, EventArgs e)
{
switch (Selections.SelectedValue)
{
case "Formatted":
TextPreview.InnerHtml = Editor.Text;
break;
case "Html":
TextPreview.InnerText = Editor.Text;
break;
default:
break;
}
}
}