csharpfritz / csharpfritz/WebFormsTest

Can't find Controls - WebForms w/ nested Master pages

Open
#58 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
26
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Has anyone had any success using WebFormsTest with nested Master Pages in WebForms?

I'm able to get WebApplicationProxy.Create to run, and WebApplicationProxy.GetPageLocation to run just fine, but controls are never able to be found.

```

WebApplicationProxy.Create(typeof(Platform.applications.applications), options);
var page= WebApplicationProxy.GetPageByLocation("/applications/test.aspx");
page.RunToEvent(WebFormEvent.Init);

var testControl= page.FindControl("btnTest"); // no controls are ever found recursively or otherwise.
```

Here is an example Master-page that inherits from a nested Master Page
```
<%@ Master Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Site1.master.cs" Inherits="Platform.applications.Site1" %>
<%@ MasterType VirtualPath="~/Main.Master" %>



`
```

Thanks

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.