protected void Page_Load(object sender, EventArgs e) { Control content = this.Controls[0]; if (content is MasterPage) { GHTTestBegin(content); } else { HtmlForm form1 = (HtmlForm)(HtmlForm)FindControl("Form1"); GHTTestBegin(form1); } GHTSubTestBegin("GHTSubTest1"); GHTSubTestAddResult(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("UserPage.aspx"))); GHTSubTestEnd(); GHTSubTestBegin("GHTSubTest2"); GHTSubTestAddResult(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("/UserPage.aspx"))); GHTSubTestEnd(); GHTSubTestBegin("GHTSubTest3"); GHTSubTestAddResult(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("../UserPage.aspx"))); GHTSubTestEnd(); GHTSubTestBegin("GHTSubTest4"); GHTSubTestAddResult(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("~/UserPage.aspx"))); GHTSubTestEnd(); GHTSubTestBegin("GHTSubTest5"); GHTSubTestAddResult(UrlTestUtils.FixUrlForDirectoriesTest(TemplateSourceDirectory)); GHTSubTestEnd(); GHTSubTestBegin("GHTSubTest6"); GHTSubTestAddResult(UrlTestUtils.FixUrlForDirectoriesTest(AppRelativeTemplateSourceDirectory)); GHTSubTestEnd(); GHTSubTestBegin("GHTSubTest7"); GHTSubTestAddResult(UrlTestUtils.FixUrlForDirectoriesTest(AppRelativeVirtualPath)); GHTSubTestEnd(); GHTTestEnd(); }
protected void Page_Load(object sender, EventArgs e) { Controls.Add(new LiteralControl(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("UserPage.aspx")))); Controls.Add(new LiteralControl("<br>")); Controls.Add(new LiteralControl(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("/UserPage.aspx")))); Controls.Add(new LiteralControl("<br>")); Controls.Add(new LiteralControl(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("../UserPage.aspx")))); Controls.Add(new LiteralControl("<br>")); Controls.Add(new LiteralControl(UrlTestUtils.FixUrlForDirectoriesTest(ResolveUrl("~/UserPage.aspx")))); Controls.Add(new LiteralControl("<br>")); Controls.Add(new LiteralControl(UrlTestUtils.FixUrlForDirectoriesTest(TemplateSourceDirectory))); Controls.Add(new LiteralControl("<br>")); Controls.Add(new LiteralControl(UrlTestUtils.FixUrlForDirectoriesTest(AppRelativeTemplateSourceDirectory))); Controls.Add(new LiteralControl("<br>")); Controls.Add(new LiteralControl(UrlTestUtils.FixUrlForDirectoriesTest(AppRelativeVirtualPath))); Controls.Add(new LiteralControl("<br>")); }