### Convert Project to SDK Style Source: https://github.com/simonegli8/webformsforcore/blob/main/docs/index.html Commands to install and run the migration tool for converting legacy projects to SDK-style projects. ```bash dotnet tool install --global Project2015To2017.Migrate2019.Tool dotnet migrate-2019 wizard ``` -------------------------------- ### Import WebFormsForCore Packages Source: https://github.com/simonegli8/webformsforcore/blob/main/docs/index.html Example of adding the core WebFormsForCore NuGet package reference to your project file. ```xml ``` -------------------------------- ### Integrate WebForms Middleware in ASP.NET Core Source: https://context7.com/simonegli8/webformsforcore/llms.txt Demonstrates the basic setup for registering the WebForms middleware within the ASP.NET Core request pipeline using the UseWebForms extension method in Program.cs. ```csharp using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); builder.Services.AddRazorPages(); builder.Services.AddControllersWithViews(); var app = builder.Build(); app.UseStaticFiles(); app.UseWebForms(); app.MapDefaultControllerRoute(); app.Run(); } } ``` -------------------------------- ### C# Session State Example for Shopping Cart Source: https://context7.com/simonegli8/webformsforcore/llms.txt Demonstrates using session state to manage a shopping cart in a WebForms application. It includes adding items, clearing the cart, and displaying the total. Session state persists data across user requests, functioning like traditional WebForms. ```csharp using System; using System.Collections.Generic; using System.Web.UI; namespace MyWebFormsApp { public partial class ShoppingCart : Page { private List Cart { get { if (Session["Cart"] == null) { Session["Cart"] = new List(); } return (List)Session["Cart"]; } } protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { BindCart(); } } protected void btnAddItem_Click(object sender, EventArgs e) { Cart.Add(new CartItem { ProductId = int.Parse(ddlProducts.SelectedValue), ProductName = ddlProducts.SelectedItem.Text, Quantity = int.Parse(txtQuantity.Text), Price = decimal.Parse(hdnPrice.Value) }); BindCart(); } protected void btnClearCart_Click(object sender, EventArgs e) { Session.Remove("Cart"); BindCart(); } private void BindCart() { gvCart.DataSource = Cart; gvCart.DataBind(); lblTotal.Text = Cart.Sum(i => i.Quantity * i.Price).ToString("C"); } } public class CartItem { public int ProductId { get; set; } public string ProductName { get; set; } public int Quantity { get; set; } public decimal Price { get; set; } } } ``` -------------------------------- ### Configure Global.asax Application Lifecycle Events (C#) Source: https://context7.com/simonegli8/webformsforcore/llms.txt Configures application-level events such as routing and bundling registration within the standard WebForms HttpApplication pattern. It handles application start, errors, and session initialization. ```csharp // Global.asax.cs - Application lifecycle events using System; using System.Web; using System.Web.Optimization; using System.Web.Routing; namespace MyWebFormsApp { public class Global : HttpApplication { void Application_Start(object sender, EventArgs e) { // Register friendly URL routes RouteConfig.RegisterRoutes(RouteTable.Routes); // Register script and CSS bundles BundleConfig.RegisterBundles(BundleTable.Bundles); } void Application_Error(object sender, EventArgs e) { // Handle application-level errors Exception ex = Server.GetLastError(); // Log exception... } void Session_Start(object sender, EventArgs e) { // Initialize session } } } ``` ```csharp // App_Start/RouteConfig.cs - URL routing configuration using System.Web.Routing; using Microsoft.AspNet.FriendlyUrls; namespace MyWebFormsApp { public static class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { var settings = new FriendlyUrlSettings(); settings.AutoRedirectMode = RedirectMode.Permanent; routes.EnableFriendlyUrls(settings); } } } ``` ```csharp // App_Start/BundleConfig.cs - Script and CSS bundling using System.Web.Optimization; namespace MyWebFormsApp { public class BundleConfig { public static void RegisterBundles(BundleCollection bundles) { // WebForms client scripts bundle bundles.Add(new ScriptBundle("~/bundles/WebFormsJs").Include( "~/Scripts/WebForms/WebForms.js", "~/Scripts/WebForms/WebUIValidation.js", "~/Scripts/WebForms/MenuStandards.js", "~/Scripts/WebForms/Focus.js", "~/Scripts/WebForms/GridView.js", "~/Scripts/WebForms/DetailsView.js", "~/Scripts/WebForms/TreeView.js", "~/Scripts/WebForms/WebParts.js")); // MS Ajax scripts bundle bundles.Add(new ScriptBundle("~/bundles/MsAjaxJs").Include( "~/Scripts/WebForms/MsAjax/MicrosoftAjax.js", "~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js", "~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js", "~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js")); // Modernizr for feature detection bundles.Add(new ScriptBundle("~/bundles/modernizr").Include( "~/Scripts/modernizr-*")); // CSS bundle bundles.Add(new StyleBundle("~/Content/css").Include( "~/Content/bootstrap.css", "~/Content/site.css")); } } } ``` -------------------------------- ### Configure Project Output Path Source: https://github.com/simonegli8/webformsforcore/blob/main/docs/index.html MSBuild configuration to set the output directory for .NET 8 builds to avoid conflicts with legacy framework builds. ```xml bin_dotnet ``` -------------------------------- ### Configure Project Output Paths for .NET Core Source: https://github.com/simonegli8/webformsforcore/blob/main/README.md This XML configuration snippet sets output paths for .NET Core builds to avoid conflicts with .NET Framework builds. It ensures that the output for net8.0 is directed to 'bin_dotnet' and for net48 to 'bin'. ```xml false false obj\$(Configuration)\$(TargetFramework)\ Exe bin_dotnet Program Library bin ``` -------------------------------- ### Set Custom Error Page Redirect (web.config) Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Replaces the default error page with a custom error page by modifying the 'defaultRedirect' attribute of the configuration tag. This example shows setting it to 'mycustompage.htm' for local viewing. ```xml ``` -------------------------------- ### Configure WebForms Middleware Options Source: https://context7.com/simonegli8/webformsforcore/llms.txt Shows how to customize WebForms behavior, including defining custom file extensions, setting default documents, and configuring physical and virtual paths. ```csharp app.UseWebForms(options => { options.AddHandleExtensions(".custom", ".legacy"); options.DefaultDocuments("index.aspx", "default.aspx", "index.htm"); options.AddDefaultDocuments("home.aspx"); options.VirtualPath("/"); options.PhysicalPath("/var/www/myapp"); options.HandleAllRequestsWithWebForms(); }); ``` -------------------------------- ### Set Custom Error Page Redirect for Remote Users (web.config) Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Replaces the default error page with a custom error page for remote users by setting the 'mode' to 'RemoteOnly' and specifying the 'defaultRedirect' attribute. This example redirects to 'mycustompage.htm'. ```xml ``` -------------------------------- ### Initialize WebForms in ASP.NET Core (C#) Source: https://github.com/simonegli8/webformsforcore/wiki/Usage Configures the ASP.NET Core application to use WebForms by calling the `UseWebForms()` extension method within the Program.cs file. This enables the application to host and run WebForms applications within an ASP.NET Core environment. ```csharp #if NETCOREAPP using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); // Add services to the container. builder.Services.AddRazorPages(); builder.Services.AddControllersWithViews(); var app = builder.Build(); app.UseStaticFiles(); //app.UseAuthorization(); app.UseWebForms(); app.MapDefaultControllerRoute(); app.Run(); } } #endif ``` -------------------------------- ### Configure Project Output Paths for WebFormsForCore (XML) Source: https://github.com/simonegli8/webformsforcore/wiki/Usage Configures the project's output paths to prevent filename collisions and ensure correct output for both .NET Framework and .NET Core builds when using WebFormsForCore. It sets specific output directories and startup objects based on the target framework. ```xml false false Exe bin_dotnet Program Library bin ``` -------------------------------- ### Implement WebForms Page and Code-Behind Source: https://context7.com/simonegli8/webformsforcore/llms.txt Demonstrates the structure of a WebForms page using ASPX markup for UI elements and a C# code-behind file for server-side logic. It includes data binding to a GridView and handling button click events. ```aspx <%-- Default.aspx - WebForms page markup --%> <%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="MyWebFormsApp._Default" %>

Welcome to WebFormsForCore

Running on:

``` ```csharp // Default.aspx.cs - Code-behind file using System; using System.Collections.Generic; using System.Web.UI; namespace MyWebFormsApp { public partial class _Default : Page { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // Display runtime platform lblPlatform.Text = System.Runtime.InteropServices.RuntimeInformation .FrameworkDescription; // Bind sample data BindProductData(); } } protected void btnRefresh_Click(object sender, EventArgs e) { BindProductData(); } private void BindProductData() { var products = new List { new { Id = 1, Name = "Widget", Price = 9.99m }, new { Id = 2, Name = "Gadget", Price = 19.99m }, new { Id = 3, Name = "Gizmo", Price = 29.99m } }; gvProducts.DataSource = products; gvProducts.DataBind(); } } } ``` -------------------------------- ### Configure WebFormsForCore in Program.cs Source: https://github.com/simonegli8/webformsforcore/blob/main/docs/index.html This snippet demonstrates how to initialize WebForms middleware within an ASP.NET Core application. It requires the WebFormsForCore package and must be placed after static file configuration. ```csharp #if NETCOREAPP using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.DependencyInjection; public class Program { public static void Main(string[] args) { var builder = WebApplication.CreateBuilder(args); builder.Services.AddRazorPages(); builder.Services.AddControllersWithViews(); var app = builder.Build(); app.UseStaticFiles(); app.UseWebForms(); app.Run(); } } #endif ``` -------------------------------- ### Configure Dual-Targeting .csproj for WebFormsForCore Source: https://context7.com/simonegli8/webformsforcore/llms.txt This XML configuration defines the project structure for dual-targeting .NET 8 and .NET Framework 4.8. It includes conditional property groups for build outputs, package references for WebFormsForCore, and a target to resolve assembly conflicts. ```xml net8.0;net48 disable disable false false obj\$(Configuration)\$(TargetFramework)\ Exe bin_dotnet Program Library bin ``` -------------------------------- ### Available NuGet Packages Source: https://context7.com/simonegli8/webformsforcore/llms.txt Reference the appropriate WebFormsForCore packages based on the System.Web features your application requires. ```APIDOC ## Available NuGet Packages Reference the appropriate WebFormsForCore packages based on the System.Web features your application requires. ```xml ``` ``` -------------------------------- ### Import WebFormsForCore NuGet Packages (XML) Source: https://github.com/simonegli8/webformsforcore/wiki/Usage Adds the necessary WebFormsForCore NuGet packages to a project targeting .NET 8. This snippet shows how to include the core WebForms package and mentions other available packages for extended functionality like System.Web.Extensions and System.Web.Optimization. ```xml ``` -------------------------------- ### Configure Trace Settings in Web.config Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Provides XML configuration samples to enable tracing and allow remote access to the trace.axd diagnostic tool. These settings are essential for debugging web applications. ```xml ``` ```xml ``` -------------------------------- ### CreateUserWizard Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Configuration settings for the CreateUserWizard component, including validation error messages and step management. ```APIDOC ## CreateUserWizard Configuration ### Description Defines validation messages and structural constraints for the CreateUserWizard control. ### Parameters - **CreateUserWizard_InvalidQuestionErrorMessage** (string) - Optional - Text shown when security question is invalid. - **CreateUserWizard_EmailRequiredErrorMessage** (string) - Optional - Text shown when e-mail is empty. - **CreateUserWizard_DuplicateCreateUserWizardStep** (string) - Optional - Error raised when multiple CreateUserWizardSteps are detected. ### Response Example { "CreateUserWizard_EmailRequiredErrorMessage": "E-mail is required." } ``` -------------------------------- ### HTTP Handler Implementation Source: https://context7.com/simonegli8/webformsforcore/llms.txt Create custom HTTP handlers (.ashx) for handling specific requests like file downloads or API endpoints. ```APIDOC ## HTTP Handler Implementation Create custom HTTP handlers (.ashx) for handling specific requests like file downloads or API endpoints. ### Description This example demonstrates how to implement a custom HTTP handler for file downloads. ### Method GET (for querying file ID) ### Endpoint /FileDownload.ashx ### Parameters #### Query Parameters - **id** (string) - Required - The ID of the file to download. ### Request Example (No specific request body for this handler, but a GET request to the endpoint with a query parameter) ### Response #### Success Response (200) - **Content-Type**: application/octet-stream - Indicates the response is a file download. - **Content-Disposition**: attachment; filename="[filename]" - Specifies the filename for the download. - **Content-Length**: [file size] - The size of the file being downloaded. #### Response Example (Binary file content for the requested file) ### Error Handling - **400 Bad Request**: If the 'id' query parameter is missing. - **404 Not Found**: If the file corresponding to the provided ID is not found. ```csharp // FileDownload.ashx.cs - Custom HTTP handler using System; using System.IO; using System.Web; namespace MyWebFormsApp { public class FileDownloadHandler : IHttpHandler { public bool IsReusable => true; public void ProcessRequest(HttpContext context) { string fileId = context.Request.QueryString["id"]; if (string.IsNullOrEmpty(fileId)) { context.Response.StatusCode = 400; context.Response.Write("File ID is required"); return; } // Retrieve file path based on ID string filePath = GetFilePath(fileId); if (!File.Exists(filePath)) { context.Response.StatusCode = 404; context.Response.Write("File not found"); return; } // Set response headers for file download FileInfo fileInfo = new FileInfo(filePath); context.Response.Clear(); context.Response.ContentType = "application/octet-stream"; context.Response.AddHeader("Content-Disposition", $"attachment; filename=\"{fileInfo.Name}\""); context.Response.AddHeader("Content-Length", fileInfo.Length.ToString()); // Stream file to response context.Response.TransmitFile(filePath); context.Response.End(); } private string GetFilePath(string fileId) { // Map file ID to physical path string basePath = HttpContext.Current.Server.MapPath("~/App_Data/Files"); return Path.Combine(basePath, $"{fileId}.dat"); } } } ``` ``` -------------------------------- ### Wizard Component Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Configuration options and error messages related to the Wizard component and its steps. ```APIDOC ## Wizard Component Configuration ### Description Configuration options and error messages related to the Wizard component and its steps. ### Wizard_Sidebar_Placeholder_Must_Be_Specified - **Type**: Error Message - **Description**: A sidebar placeholder must be specified on Wizard '{0}' when DisplaySideBar is set to true. Specify a placeholder by setting a control's ID property to "{1}". The placeholder control must also specify runat="server". ### Wizard_Step_Placeholder_Must_Be_Specified - **Type**: Error Message - **Description**: A step placeholder must be specified on Wizard '{0}'. Specify a placeholder by setting a control's ID property to "{1}". The placeholder control must also specify runat="server". ### Wizard_LayoutTemplate - **Type**: Property - **Description**: The template used for a customized layout. ### Wizard_WizardStepOnly - **Type**: Error Message - **Description**: Only WizardStep can be added to WizardControlCollection. ### WizardStep_AllowReturn - **Type**: Property - **Description**: Determines whether the step can be visited more than once. ### WizardStep_Name - **Type**: Property - **Description**: The name of wizard step. ### WizardStep_Title - **Type**: Property - **Description**: The title of wizard step. ### WizardStep_StepType - **Type**: Property - **Description**: The type of wizard step. ### WizardStep_WrongContainment - **Type**: Error Message - **Description**: WizardStep can only be placed inside the tag of a Wizard control. ``` -------------------------------- ### SiteMapPath Control Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Configuration for the SiteMapPath control, including node styles, templates, and navigation options. ```APIDOC ## SiteMapPath Control Configuration ### Description Configuration for the SiteMapPath control, including node styles, templates, and navigation options. ### SiteMapPath_CannotFindUrl **Description**: Could not find the sitemap node with URL '{0}'. ### SiteMapPath_CurrentNodeStyle **Description**: The style applied to current node. ### SiteMapPath_CurrentNodeTemplate **Description**: The template used for the current node. ### SiteMapPath_HoverStyle **Description**: The style applied for mouse hover. ### SiteMapPath_OnItemDataBound **Description**: Fires when an item is databound. ### SiteMapPath_NodeStyle **Description**: The style applied to navigation nodes. ### SiteMapPath_NodeTemplate **Description**: The template used for the navigation nodes. ### SiteMapPath_PathDirection **Description**: The direction of path to render. ### SiteMapPath_PathSeparator **Description**: The separator string between each node. ### SiteMapPath_PathSeparatorTemplate **Description**: The template used for the path separators. ### SiteMapPath_PathSeparatorStyle **Description**: The style applied to the path separators. ### SiteMapPath_Provider **Description**: The SitemapProvider used by this control. ### SiteMapPath_RenderCurrentNodeAsLink **Description**: Indicates whether the current node will be rendered as a link. ### SiteMapPath_RootNodeStyle **Description**: The style applied to root node. ### SiteMapPath_RootNodeTemplate **Description**: The template used for the root node. ### SiteMapPath_SiteMapProvider **Description**: The name of the sitemap provider. ### SiteMapPath_SkipToContentText **Description**: The text that appears in the ALT attribute of the invisible image link that allows screen readers to skip repetitive content. ### SiteMapPath_Default_SkipToContentText **Description**: Skip Navigation Links ### SiteMapPath_ShowToolTips **Description**: Indicates whether tooltip will be shown. ### SiteMapPath_ParentLevelsDisplayed **Description**: The number of parent nodes to display. ``` -------------------------------- ### FormView Control Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Configuration properties and event handlers for the FormView control. ```APIDOC ## FormView Configuration ### Description Properties and events to manage the display, paging, and templating of the FormView control. ### Parameters #### Properties - **AllowPaging** (boolean) - Optional - Whether to turn on paging functionality. - **CellPadding** (int) - Optional - The padding within cells. - **PageIndex** (int) - Optional - The index of the current page being displayed. - **RenderOuterTable** (boolean) - Optional - Whether to render a table around the templates. #### Events - **OnPageIndexChanged** - Fires when the page index has changed. - **OnItemCommand** - Fires when a CommandEvent is generated. ``` -------------------------------- ### Configure Web.config for WebForms Compatibility (XML) Source: https://context7.com/simonegli8/webformsforcore/llms.txt Configures the web.config file for WebForms compatibility, including compilation settings, namespaces, and assembly binding redirects. This ensures proper integration of WebForms features and dependencies. ```xml ``` -------------------------------- ### Custom HTTP Handler for File Downloads in C# Source: https://context7.com/simonegli8/webformsforcore/llms.txt This C# code implements a custom HTTP handler (.ashx) to manage file download requests. It processes a file ID from the query string, locates the file, sets appropriate response headers, and streams the file content to the client. It includes error handling for missing file IDs or non-existent files. ```csharp using System; using System.IO; using System.Web; namespace MyWebFormsApp { public class FileDownloadHandler : IHttpHandler { public bool IsReusable => true; public void ProcessRequest(HttpContext context) { string fileId = context.Request.QueryString["id"]; if (string.IsNullOrEmpty(fileId)) { context.Response.StatusCode = 400; context.Response.Write("File ID is required"); return; } string filePath = GetFilePath(fileId); if (!File.Exists(filePath)) { context.Response.StatusCode = 404; context.Response.Write("File not found"); return; } FileInfo fileInfo = new FileInfo(filePath); context.Response.Clear(); context.Response.ContentType = "application/octet-stream"; context.Response.AddHeader("Content-Disposition", $"attachment; filename=\"{fileInfo.Name}\""); context.Response.AddHeader("Content-Length", fileInfo.Length.ToString()); context.Response.TransmitFile(filePath); context.Response.End(); } private string GetFilePath(string fileId) { string basePath = HttpContext.Current.Server.MapPath("~/App_Data/Files"); return Path.Combine(basePath, $"{fileId}.dat"); } } } ``` -------------------------------- ### Style and Formatting Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web.Mobile/System.Web.Mobile.txt Defines the styling properties applicable to mobile controls, such as colors, fonts, and alignment. ```APIDOC ## PUT /styles/{styleName} ### Description Updates the visual style properties for a specific control style. ### Method PUT ### Endpoint /styles/{styleName} ### Parameters #### Path Parameters - **styleName** (string) - Required - The unique name of the style. #### Request Body - **Alignment** (string) - Optional - Horizontal alignment of the control. - **BackColor** (string) - Optional - Background color of the control. - **ForeColor** (string) - Optional - Color of the text within the control. - **Font** (string) - Optional - Font for text within the control. ### Response #### Success Response (200) - **message** (string) - Style updated successfully. ``` -------------------------------- ### DataGrid Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Settings for the DataGrid control, including paging, sorting, and item styling. ```APIDOC ## DataGrid Configuration ### Description Defines properties for DataGrid functionality such as paging, sorting, and visual styles. ### Parameters - **DataGrid_AllowPaging** (boolean) - Optional - Enables paging functionality. - **DataGrid_AllowSorting** (boolean) - Optional - Enables column sorting. - **DataGrid_PageSize** (integer) - Optional - Number of items per page. - **DataGrid_EditItemIndex** (integer) - Optional - Index of the item in edit mode. ### Response Example { "DataGrid_AllowPaging": true, "DataGrid_PageSize": 10 } ``` -------------------------------- ### Menu Control Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Configuration options for the Menu control, including styles for static items, sub-menus, and separators. ```APIDOC ## Menu Control Configuration ### Description Configuration options for the Menu control, including styles for static items, sub-menus, and separators. ### Menu_StaticSelectedStyle **Description**: The style applied to the selected item if in the static part of the menu. ### Menu_StaticSubMenuIndent **Description**: The indentation between a static menu item and its static sub-menu. ### Menu_StaticTemplate **Description**: The template for static menu items. ### Menu_StaticTopSeparatorImageUrl **Description**: The URL of the image that will serve as a top separator in the static part of the menu. ``` -------------------------------- ### HyperLink and Image Control Properties Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Configuration properties for link and image-based controls. ```APIDOC ## HyperLink and Image Controls ### Description Properties for configuring HyperLink, Image, and ImageButton controls. ### Parameters #### HyperLink Properties - **NavigateUrl** (string) - Required - The URL to navigate to. - **ImageUrl** (string) - Optional - The URL of an image to be displayed. - **Target** (string) - Optional - The target frame for the navigation. #### Image Properties - **AlternateText** (string) - Optional - Text displayed when the image cannot be shown. - **ImageAlign** (string) - Optional - The alignment of the image. ``` -------------------------------- ### ObjectList Control Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web.Mobile/System.Web.Mobile.txt Defines the properties and event handlers for the ObjectList control, which manages data-bound lists and command interactions. ```APIDOC ## GET /controls/objectlist ### Description Retrieves or configures the properties for an ObjectList control, including data binding, field generation, and command handling. ### Method GET ### Endpoint /controls/objectlist ### Parameters #### Query Parameters - **DataSource** (string) - Required - Data source that populates items in the list. - **LabelField** (string) - Optional - Field in the data source to use for a compact representation. - **AutoGenerateFields** (boolean) - Optional - Whether fields are generated automatically at run time. ### Response #### Success Response (200) - **Fields** (array) - Collection of fields representing items in details view. - **Commands** (array) - Collection of commands for each item in the list. ``` -------------------------------- ### Panel Control Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Configuration options for the Panel control, including background, alignment, and scrollbar settings. ```APIDOC ## Panel Control Configuration ### Description Configuration options for the Panel control, including background, alignment, and scrollbar settings. ### Panel_BackImageUrl **Description**: The background image of the panel. ### Panel_DefaultButton **Description**: The default button for the panel. ### Panel_Direction **Description**: The direction of text in the panel. ### Panel_GroupingText **Description**: The text of group box around this control's contents. ### Panel_HorizontalAlign **Description**: The horizontal alignment of the content. ### Panel_ScrollBars **Description**: The appearance of scrollbars for the panel. ### Panel_Wrap **Description**: Whether the content should wrap or not. ``` -------------------------------- ### WebParts Behavior Editor Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Properties for configuring the behavior of Web Parts. ```APIDOC ## WebParts Behavior Editor ### Description Properties for configuring the behavior of Web Parts. ### BehaviorEditorPart_AllowClose - **Type**: Property - **Description**: Allow Close ### BehaviorEditorPart_AllowConnect - **Type**: Property - **Description**: Allow Connect ### BehaviorEditorPart_AllowHide - **Type**: Property - **Description**: Allow Hide ### BehaviorEditorPart_AllowMinimize - **Type**: Property - **Description**: Allow Minimize ### BehaviorEditorPart_AllowZoneChange - **Type**: Property - **Description**: Allow Zone Change ### BehaviorEditorPart_ExportMode - **Type**: Property - **Description**: Export Mode ### BehaviorEditorPart_ExportModeNone - **Type**: Enum Value - **Description**: Do not allow ### BehaviorEditorPart_ExportModeAll - **Type**: Enum Value - **Description**: Export all data ### BehaviorEditorPart_ExportModeNonSensitiveData - **Type**: Enum Value - **Description**: Non-sensitive data only ### BehaviorEditorPart_HelpMode - **Type**: Property - **Description**: Help Mode ### BehaviorEditorPart_HelpModeModal - **Type**: Enum Value - **Description**: Modal ### BehaviorEditorPart_HelpModeModeless - **Type**: Enum Value - **Description**: Modeless ### BehaviorEditorPart_HelpModeNavigate - **Type**: Enum Value - **Description**: Navigate ### BehaviorEditorPart_Description - **Type**: Property - **Description**: Description ### BehaviorEditorPart_TitleLink - **Type**: Property - **Description**: Title Link ### BehaviorEditorPart_TitleIconImageLink - **Type**: Property - **Description**: Title Icon Image Link ### BehaviorEditorPart_CatalogIconImageLink - **Type**: Property - **Description**: Catalog Icon Image Link ### BehaviorEditorPart_HelpLink - **Type**: Property - **Description**: Help Link ### BehaviorEditorPart_ImportErrorMessage - **Type**: Property - **Description**: Import Error Message ### BehaviorEditorPart_AuthorizationFilter - **Type**: Property - **Description**: Authorization Filter ### BehaviorEditorPart_AllowEdit - **Type**: Property - **Description**: Allow Edit ### BehaviorEditorPart_PartTitle - **Type**: Property - **Description**: Behavior ``` -------------------------------- ### Button Properties Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Properties for configuring buttons, including text, click events, and submit behavior. ```APIDOC ## Button_OnClientClick ### Description The client-side script that is executed on a client-side OnClick. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## ButtonColumn_ButtonType ### Description The type of button contained within the column. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## ButtonColumn_CausesValidation ### Description Whether pressing the button will cause validation to occur. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## ButtonColumn_DataTextField ### Description The field bound to the text property of the button. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## ButtonColumn_DataTextFormatString ### Description The formatting applied to the value bound to the Text property. For example, "select: {0}". ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## ButtonColumn_Text ### Description The text used for the button. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## ButtonColumn_ValidationGroup ### Description The name of the validation group for which this button should cause validation. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## Button_SoftkeyLabel ### Description The label shown when the Button is mapped to a mobile device softkey. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## Button_Text ### Description The text to be shown on the button. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## Button_OnClick ### Description Fires when the button is clicked. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## Button_UseSubmitBehavior ### Description Indicates whether the button render as a submit button. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ``` -------------------------------- ### MenuItemBinding Configuration Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Defines how menu items are bound to data sources, including field mappings and default display properties. ```APIDOC ## MenuItemBinding Configuration ### Description Defines the mapping between data source fields and menu item properties during data binding. ### Parameters - **TextField** (string) - Required - The data source field name for the menu item text. - **NavigateUrlField** (string) - Optional - The data source field name for the navigation URL. - **ValueField** (string) - Optional - The data source field name for the unique value. - **FormatString** (string) - Optional - The format string for the text field. ### Request Example { "TextField": "Title", "NavigateUrlField": "Url", "ValueField": "Id" } ``` -------------------------------- ### WebParts Appearance Editor Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt Properties for configuring the appearance of Web Parts. ```APIDOC ## WebParts Appearance Editor ### Description Properties for configuring the appearance of Web Parts. ### AppearanceEditorPart_Title - **Type**: Property - **Description**: Title ### AppearanceEditorPart_Height - **Type**: Property - **Description**: Height ### AppearanceEditorPart_Width - **Type**: Property - **Description**: Width ### AppearanceEditorPart_ChromeType - **Type**: Property - **Description**: Chrome Type ### AppearanceEditorPart_Hidden - **Type**: Property - **Description**: Hidden ### AppearanceEditorPart_Direction - **Type**: Property - **Description**: Direction ### AppearanceEditorPart_PartTitle - **Type**: Property - **Description**: Appearance ### AppearanceEditorPart_Pixels - **Type**: Unit - **Description**: pixels ### AppearanceEditorPart_Points - **Type**: Unit - **Description**: points ### AppearanceEditorPart_Picas - **Type**: Unit - **Description**: picas ### AppearanceEditorPart_Inches - **Type**: Unit - **Description**: inches ### AppearanceEditorPart_Millimeters - **Type**: Unit - **Description**: millimeters ### AppearanceEditorPart_Centimeters - **Type**: Unit - **Description**: centimeters ### AppearanceEditorPart_Percent - **Type**: Unit - **Description**: percent ### AppearanceEditorPart_Em - **Type**: Unit - **Description**: em ### AppearanceEditorPart_Ex - **Type**: Unit - **Description**: ex ``` -------------------------------- ### Configure AssemblyResourceLoader Handler Source: https://github.com/simonegli8/webformsforcore/blob/main/src/WebFormsForCore.Web/System.Web.txt This snippet shows how to register the WebResource.axd handler in the web.config file, which is necessary for the AssemblyResourceLoader to process requests. It specifies the path, verb, and type for the handler. ```xml ``` -------------------------------- ### WebFormsForCore NuGet Package References for .NET 8.0 Source: https://context7.com/simonegli8/webformsforcore/llms.txt This snippet shows how to reference various WebFormsForCore NuGet packages in a .NET 8.0 project. It covers core functionality, configuration, web services, extensions, optimization, mobile controls, drawing, build tools, and AjaxControlToolkit. ```xml ```