-
Notifications
You must be signed in to change notification settings - Fork 0
/
All.cshtml
43 lines (38 loc) · 1.51 KB
/
All.cshtml
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
@Html.DevExpress().RoundPanel(settings => {
settings.Name = "rp";
settings.SetContent(() => {
//Raw HTML
ViewContext.Writer.Write("<table border=\"1\"><tr><td>Content From Raw <b>HTML</b> Table Here...</td></tr></table>");
ViewContext.Writer.Write("<br/>");
//Action Method
Html.RenderAction("SeparateAction");
ViewContext.Writer.Write("<br/>");
ViewContext.Writer.Write("<br/>");
//Partial View with Html.BeginForm
Html.RenderPartial("SeparatePartialView");
ViewContext.Writer.Write("<br/>");
ViewContext.Writer.Write("<br/>");
//Html Helper
ViewContext.Writer.Write(Html.TextBox("txtName").ToHtmlString());
ViewContext.Writer.Write("<br/>");
ViewContext.Writer.Write("<br/>");
//Conditional
ViewContext.Writer.Write("Content From Conditional Rendering Block:");
ViewContext.Writer.Write("<br/>");
bool condition = DateTime.Now.Year == 2014;
if(condition) {
ViewContext.Writer.Write("<b>Condition Passed</b>");
} else {
ViewContext.Writer.Write("<b>Condition Failed</b>");
}
ViewContext.Writer.Write("<br/>");
ViewContext.Writer.Write("<br/>");
//DevExpress MVC Extensions
Html.DevExpress().Label(lbl => {
lbl.Name = "lbl";
lbl.Text = "Content From DevExpress Label Here...";
}).Render();
});
}).GetHtml()
<br />
@Html.ActionLink("<< Home", "Index")