Practical Web Forms / Core guide
Component examples, matching parameters and adaptations for bindings, events and storage.
Palettes and density | Wizard models | Grid presets
All migration examples | Open the text manual
Selected examples include those hidden by filters. Selection and download/print modes are included in the URL.
Markdown preview
Save or import selection
Selected example order
Text snippets for integration into your host; authentication, data and permissions belong to the application.
All examples
No examples found.
| Web Forms | Core | Adaptation |
|---|---|---|
| ViewState/postback | Parameters, @bind and EventCallback | Keep business persistence in the host. |
| Semicolon-separated values | Typed collections or text aliases | Use FSOption when label and value differ. |
| FSGrid / FSGridItem | FSGrid<TItem> / FSGridColumn<TItem> | Configure models and providers; SQL and authorization stay in the host. |
| Text event script | Delegate or EventCallback | Migrate the business action; do not execute client strings on the server. |
| PastaUpload / PastaRaiz | Storage and resolver registered through DI | The client chooses neither the physical root nor permissions. |
| Child FSWizardStep | FSWizardStepDefinition | Preserve each step subtitle, icon and validation. |
| Upload/Editor: remove reference | DeleteAsync: remove reference | Physical deletion belongs to the authorized FileManager. |
| Controls with server IDs | Stable Id per instance | Use distinct IDs and dedicated preference keys. |
| Separate language resources | IFSLocalizer / FSLocalizer | Keep internal values; translate labels and messages. |
Text and currency
Core uses decimal? for numbers. Web Forms accepts a decimal dot or comma; when both occur, the last separator identifies the decimal part. Required validation remains native and fields start in a neutral state.
Web Forms
Show or hide code
<fs:FSTxtBox runat="server" TextoComponente="Nome" ValorComponente="Ana" Obrigatoria="true" />
<fs:FSCurrencyBox runat="server" ValorComponente="1250.50" />Core
Show or hide code
<FSTxtBox TextoComponente="Nome" @bind-ValorComponente="nome" Obrigatoria />
<FSCurrencyBox @bind-ValorComponente="valor" />
@code {
private string? nome = "Ana";
private decimal? valor = 1250.50m;
}Multiple selection
OpcoesPT/OpcoesEN do not configure these controls. Web Forms uses Opcoes; Core provides OpcoesTexto or IReadOnlyList<FSOption>. OpcoesValores separates labels from internal values in controls that support it.
Web Forms
Show or hide code
<fs:FSMultiSelectBox runat="server" TextoComponente="Areas"
Opcoes="Financeiro;Comercial;Tecnologia"
ValoresComponente="Tecnologia" />Core
Show or hide code
<FSMultiSelectBox TextoComponente="Areas"
OpcoesTexto="Financeiro;Comercial;Tecnologia"
@bind-ValoresComponente="areas" />
@code {
private IReadOnlyList<string> areas = ["Tecnologia"];
}Wizard and completion event
Import FSISA.Core.Models in the Razor file or _Imports.razor. Core receives RenderFragment and typed callbacks; textual OnClientFinish does not execute JavaScript in Core. Each step can receive its own EditContext and asynchronous validation.
Web Forms
Show or hide code
<fs:FSWizard runat="server" Titulo="Cadastro"
OnClientFinish="finalizarCadastro(); return false;">
<fs:FSWizardStep runat="server" Titulo="Dados"
Subtitulo="Identificacao" Icone="bi bi-person">...</fs:FSWizardStep>
</fs:FSWizard>Core
Show or hide code
<FSWizard Titulo="Cadastro" Etapas="etapas" OnFinish="ConcluirAsync" />
@code {
private readonly FSWizardStepDefinition[] etapas = [
new("Dados", b => b.AddContent(0, "Preencha os dados."),
Subtitle: "Identificacao", Icon: "bi bi-person")
];
private Task ConcluirAsync() => Task.CompletedTask;
}Authorized upload
The Web Forms example delegates FSUpload.aspx to FSSecureFileUploadExampleHandler and requires an authenticated identity and session permission. Permission must come from a host decision, never a client parameter. The Core demo resolver requires an authenticated identity with NameIdentifier and isolates the root by user. Register your IFSUploadContextResolver in another host. Removing references preserves file bytes.
Web Forms
Show or hide code
<fs:FSUpload runat="server" TextoComponente="Documento"
UploadPage="~/FSUpload.aspx" ExtensoesPermitidas=".pdf"
TamanhoMaximoKB="4096" HabilitarMultiplo="true" />
' No servidor, SOMENTE apos autorizar a conta:
Session("FSISA.CanUpload") = TrueCore
Show or hide code
<FSUpload TextoComponente="Documento"
ChaveContexto="persisted-grid" ExtensoesPermitidas=".pdf"
TamanhoMaximoKB="4096" HabilitarMultiplo />Local QRCode
MostrarBotaoBaixarSvg and MostrarBotaoBaixarPng control local downloads. PNG keeps integer modules, rounding the requested size. Both examples generate local SVG without sending content to third parties. Deploy QRCoder.dll from the matching build: Web Forms uses the .NET Framework version; Core receives it through NuGet or the manual package. In Web Forms, an empty UrlServico selects local generation; a relative URL keeps an internal endpoint, while an external service requires HTTPS and explicit permission. In Core, PermitirEnvioServicoExterno=false selects local generation. MostrarBotaoCopiar explicitly copies the generated content, with a manual alternative if clipboard access is blocked. NomeArquivoBaixar configures the base name of local downloads.
Web Forms
Show or hide code
<fs:FSQRCode runat="server" TextoComponente="Pedido"
ValorComponente="Pedido 123" Tamanho="180" />Core
Show or hide code
<FSQRCode TextoComponente="Pedido"
ValorComponente="Pedido 123" Tamanho="180" />Scoped theme
Paleta accepts personalizada, clara or escura. Densidade accepts padrao, compacta or confortavel. Use the same scope and palette to compare pages. The theme applies focus colors, button states, borders and corner radius within the supplied selector. Custom layout classes remain available. contraste-claro and contraste-escuro are also available. The /temas page imports and exports JSON, including files limited to 4 KB. Custom colors use JSON v2; v1 remains supported. Files are previewed before confirmation, and /comparar-temas shows two independent scopes. Format v3 includes a border radius from 0px to 64px. Pasted JSON also requires preview and confirmation; the table shows differences.
Web Forms
Show or hide code
<div id="cadastro">
<fs:FSTheme runat="server" EscopoCss="#cadastro"
Paleta="escura" Densidade="compacta" RaioBorda="8px" />
<button class="btn btn-primary" type="button">Salvar</button>
</div>Core
Show or hide code
<div id="cadastro">
<FSTheme EscopoCss="#cadastro"
Paleta="escura" Densidade="compacta" RaioBorda="8px" />
<button class="btn btn-primary" type="button">Salvar</button>
</div>Ready-made Wizard models
FSWizardModels.Criar provides cadastro, documento and solicitacao (two steps), or integracao and compra (three steps). Supply one content slot per step. Recreate Web Forms controls in OnInit; provide RenderFragment in Core and optionally the host IFSLocalizer. Models neither grant permissions nor persist data. The five-argument overload accepts per-step subtitles and icons while preserving the original signature. See wizard-validacao-assincrona.md for Core step validation and Web Forms server confirmation.
Web Forms
Show or hide code
' No OnInit, com controles novos e IDs estaveis:
Dim dados As New FSTxtBox With {.ID="Nome",.TextoComponente="Nome",.Obrigatoria=True}
Dim revisao As New LiteralControl("<p>Revise os dados.</p>")
For Each etapa In FSWizardModels.Criar("cadastro", New Control() {dados,revisao})
MeuWizard.Controls.Add(etapa)
NextCore
Show or hide code
@using FSISA.Core.Models
<FSWizard Etapas="etapas" />
@code {
private readonly IReadOnlyList<FSWizardStepDefinition> etapas =
FSWizardModels.Criar("cadastro", [
b => b.AddContent(0,"Dados do cadastro."),
b => b.AddContent(0,"Revise os dados.")
]);
}Grid presentation presets
Configure the data source, columns and authorization in the host. PresetApresentacao accepts personalizado (keeps the layout), consulta or edicao. Presets do not enable CRUD, change queries or grant write permissions. FSTheme density takes priority for configured dimensions. Reset preset preserves search, filters, page and columns and restores the presentation configured by the host.
Web Forms
Show or hide code
<fs:FSGrid runat="server" ID="MinhaGrid" ID_Componente="10"
PresetApresentacao="consulta" />Core
Show or hide code
<FSGrid TItem="Pedido" Itens="pedidos" Colunas="colunas"
PresetApresentacao="edicao" />