本文整理汇总了C#中Poker.Render方法的典型用法代码示例。如果您正苦于以下问题:C# Poker.Render方法的具体用法?C# Poker.Render怎么用?C# Poker.Render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Poker
的用法示例。
在下文中一共展示了Poker.Render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PerformDataBind_PerformSelect
public void PerformDataBind_PerformSelect ()
{
Poker p = new Poker ();
p.DataBind ();
string html = p.Render ();
#region #1
string orig = "<select type=\"MyType\" name=\"MyName\" value=\"MyValue\">\n\t<option selected=\"selected\" value=\"1\">1</option>\n\t<option value=\"2\">2</option>\n\t<option value=\"3\">3</option>\n\n</select>";
#endregion
HtmlDiff.AssertAreEqual (orig, html, "PerformDataBind");
}
示例2: Label_Render
public void Label_Render ()
{
Poker l = new Poker ();
l.Text = "Hello";
Assert.AreEqual ("<span>Hello</span>", l.Render (), "R1");
}
示例3: AddAttributesToRender
public void AddAttributesToRender ()
{
Poker p = new Poker ();
ListItem foo = new ListItem ("foo");
ListItem bar = new ListItem ("bar");
p.Items.Add (foo);
p.Items.Add (bar);
#region orig
string orig = "<select type=\"MyType\" name=\"MyName\" value=\"MyValue\">\n\t<option value=\"foo\">foo</option>\n\t<option value=\"bar\">bar</option>\n\n</select>";
#endregion
string html = p.Render ();
HtmlDiff.AssertAreEqual(orig,html,"AddAttributesToRender failed");
}
示例4: MultilineRenderEscape
public void MultilineRenderEscape ()
{
Poker t = new Poker ();
t.TextMode = TextBoxMode.MultiLine;
t.Text = "</textarea>";
string exp = "<textarea rows=\"2\" cols=\"20\">\r\n</textarea></textarea>";
HtmlDiff.AssertAreEqual(exp, t.Render (),"MultilineRenderEscape");
}
示例5: AssocControlId
public void AssocControlId ()
{
Page p = new Page ();
Poker l = new Poker ();
TextBox t = new TextBox ();
t.ID = "mytxtbox";
p.Controls.Add (l);
p.Controls.Add (t);
l.Text = "Hello";
l.AssociatedControlID = "mytxtbox";
Assert.AreEqual (@"<label for=""mytxtbox"">Hello</label>", l.Render ());
}
示例6: ValidationRender
public void ValidationRender ()
{
/* test to show that the validation settings
* have no effect on downlevel rendering */
Poker t = new Poker ();
t.TrackState();
t.ValidationGroup = "VG";
t.CausesValidation = true;
t.TextMode = TextBoxMode.MultiLine;
string exp = "<textarea rows=\"2\" cols=\"20\"></textarea>";
HtmlDiff.AssertAreEqual (exp, t.Render (),"ValidationRender");
}
示例7: PerformDataBind_PerformSelect
public void PerformDataBind_PerformSelect ()
{
Poker p = new Poker ();
p.DataBind ();
string html = p.Render ();
#region #1
string orig = @"<select type=""MyType"" name=""MyName"" value=""MyValue"">
<option selected=""selected"" value=""1"">1</option>
<option value=""2"">2</option>
<option value=""3"">3</option>
</select>";
#endregion
HtmlDiff.AssertAreEqual (orig, html, "PerformDataBind");
}
示例8: DefaultButton_Init
public static void DefaultButton_Init (Page p)
{
Poker pl = new Poker ();
pl.DefaultButton = "test";
p.Form.Controls.Add (pl);
pl.Render ();
}
示例9: Direction
public void Direction ()
{
Poker p = new Poker ();
p.Direction = ContentDirection.LeftToRight;
string html = p.Render();
string origHtml = "<div dir=\"ltr\">\n\n</div>";
HtmlDiff.AssertAreEqual (origHtml, html, "Direction");
}
示例10: NoWrap
public void NoWrap ()
{
Poker p = new Poker ();
p.Wrap = false;
p.Controls.Add (new LiteralControl ("TEXT"));
#if NET_2_0
const string html ="<div style=\"white-space:nowrap;\">\n\tTEXT\n</div>";
#elif NET_1_1
const string html ="<div nowrap=\"nowrap\">\n\tTEXT\n</div>";
#endif
Assert.AreEqual (html, p.Render ());
}
示例11: DefaultButton__Init
public static void DefaultButton__Init (Page p)
{
Poker pl = new Poker ();
pl.DefaultButton = "MyButton";
Button b = new Button ();
b.ID = "MyButton";
p.Form.Controls.Add (b);
p.Form.Controls.Add (pl);
string html = pl.Render ();
if (html.IndexOf ("onkeypress") == -1)
Assert.Fail ("Default button script not created #1");
if (html.IndexOf ("MyButton") == -1)
Assert.Fail ("Default button script not created #2");
}
示例12: Render
public void Render ()
{
Poker l = new Poker ();
l.Text = "Hello";
Assert.AreEqual ("<a>Hello</a>", l.Render (), "R1");
}
示例13: PostBackUrl_Load
public static void PostBackUrl_Load (Page p)
{
Poker b = new Poker ();
p.Controls.Add (b);
b.PostBackUrl = "~/MyPostBackUrl.aspx";
string html = b.Render ();
if (html.IndexOf ("MyPostBackUrl.aspx") == -1)
Assert.Fail ("PostBackUrl not created");
}
示例14: OnClientClick
public void OnClientClick ()
{
Poker b = new Poker ();
b.OnClientClick = "MyClickMethod";
string html = b.Render ();
HtmlDiff.AssertAreEqual ("<a onclick=\"MyClickMethod;\"></a>", html, "OnClientClick Failed");
}
示例15: Render_2_0
public void Render_2_0 ()
{
Poker c = new Poker();
c.ErrorMessage = "aw shucks";
c.Display = ValidatorDisplay.Static;
c.Enabled = true;
c.EnableViewState = true;
string html = c.Render ();
HtmlDiff.AssertAreEqual ("<span style=\"color:Red;\">aw shucks</span>", html, "Render#1");
}