# TextControlController.GetResource Method

> Returns the current global viewer bundle for the legacy resource URL.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Namespace:** `TXTextControl.Web.MVC.DocumentViewer`
- **Package:** `TXTextControl.Web.DocumentViewer` (assembly `TXTextControl.Web.MVC.DocumentViewer.dll`, from nuget.org, the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.Web.DocumentViewer.Classic` (assembly `TXTextControl.Web.MVC.DocumentViewer.dll`, from nuget.org)
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.Web.MVC.DocumentViewer > TextControlController.GetResource Method
- **401 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc-documentviewer/textcontrolcontroller/getresource-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc-documentviewer/textcontrolcontroller/getresource-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc-documentviewer/textcontrolcontroller/getresource-method/llms-full.txt

---

### Description

Returns the current global viewer bundle for the legacy resource URL.

### Syntax

#### GetResource(string)

Returns the current global viewer bundle for the legacy resource URL.

Only for .NET 8.

```csharp
public Microsoft.AspNetCore.Mvc.ActionResult GetResource(string Resource);
```

```vbnet
Public Function GetResource(Resource As String) As Microsoft.AspNetCore.Mvc.ActionResult
```

| Parameter | Description |
|---|---|
| Resource | The legacy resource name. |

#### GetResource(string)

Only for .NET Framework 4.5.

```csharp
public System.Web.Mvc.ActionResult GetResource(string Resource);
```

```vbnet
Public Function GetResource(Resource As String) As System.Web.Mvc.ActionResult
```

### Return Value

The embedded viewer bundle, or a not-found response.

---

## Nearby

- **Previous:** [TextControlController.GetPages Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc-documentviewer/textcontrolcontroller/getpages-method/llms-full.txt)
- **Next:** [TextControlController.LoadDocument Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-web-mvc-documentviewer/textcontrolcontroller/loaddocument-method/llms-full.txt)
