Skip to content

System.Web.WebPages

reference
1 min readUpdated

Kind: Service

Source: Pams/API/Pams.API/Pams.API.csproj (line 1)

Part of: Pams

NuGet package dependency

System.Web.WebPages is a NuGet package dependency referenced by the legacy-format Pams.API.csproj project. It supports server-side web page and Razor rendering components used by the API project's .NET web stack.

Diagram

mermaid
sequenceDiagram
    participant Client
    participant API as Pams.API
    participant WebPages as System.Web.WebPages
    participant View as Razor Page

    Client->>API: Request page endpoint
    API->>WebPages: Create rendering context
    WebPages->>View: Render Razor page
    View-->>WebPages: Generated HTML
    WebPages-->>API: Rendered response
    API-->>Client: HTML response

Usage

typescript
async function loadPage(path: string): Promise<string> {
  const response = await fetch(path, {
    headers: {
      Accept: "text/html",
    },
  });

  if (!response.ok) {
    throw new Error(`Page request failed: ${response.status}`);
  }

  return response.text();
}

loadPage("/pages/example").then((html) => {
  document.getElementById("page-content")!.innerHTML = html;
});

AI Coding Instructions

  • Treat System.Web.WebPages as a server-side NuGet dependency; browser TypeScript code does not import it directly.
  • Keep package references compatible with the legacy project format in Pams.API.csproj.
  • Check Razor page and MVC dependency versions before changing this package reference.
  • Route browser requests through API endpoints or rendered page routes supported by the .NET application.

Was this page helpful?

Download as PDF