csharpfritz / csharpfritz/WebFormsTest

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

Aperta
#58 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
26
Fork
14
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.