Structr
  • Welcome
  • Utilities
    • Abstractions
      • Check
      • Ensure
      • Money
      • HierarchyId
      • Providers
        • SequentialGuidProvider
      • Extensions
        • DateTime
        • Dictionary
        • DirectoryInfo
        • Enumerable
        • Enum
        • Expression
        • Int
        • Long
        • MemberInfo
        • Object
        • Queryable
        • ServiceCollection
        • String
        • Type
      • Helpers
        • AsyncHelper
        • BindHelper
      • JsonConverters
        • DateOnly
        • TimeOnly
        • StringNumber
    • Collections
      • AutoMapper extensions
    • IO
      • FileHelper
      • MimeTypeHelper
      • PathHelper
      • SequentialFileName
    • Configuration
      • Providers
        • JSON-file
        • XML-file
        • In-Memory
        • Consul
      • Get settings
      • Set settings
      • Customization
    • Email
      • Razor
    • Navigation
      • Menu
      • Breadcrumbs
    • Security
  • Domain
    • Domain
      • Entities
      • Value objects
  • Data Access
    • Entity Framework Core
    • Entity Framework 6
  • Use Cases
    • Operations
      • Filtering
      • Decoration
    • Notices
    • Validation
    • Specifications
    • Stateflows
      • StateMachine
      • Configurations
  • Presentation
    • ASP.NET Core
      • Client
      • Http
      • JavaScript
      • Json
      • Mvc
      • Referrer
      • Rewrite
      • Routing
      • TagHelpers
      • Validation
Powered by GitBook
On this page
  • JavaScriptResult
  • AjaxRedirectResult
  • JavaScriptController extensions

Was this helpful?

Edit on GitHub
  1. Presentation
  2. ASP.NET Core

JavaScript

This part provides IActionResults and extension methods related to JavaScript and client-side things.

JavaScriptResult

JavaScriptResult class serves as a simple wrapper for ContentResult with ContentType equals application/javascript and serves to transfer javascript code to client. It contains no additional fields, properties or logic.

AjaxRedirectResult

This class represents the implementation of RedirectResult that checks that request has ajax nature and performs redirect to Url via ajax instead of normal redirecting. In case of normal request the standard redirecting procedure will be performed.

JavaScriptController extensions

Method name
Return type
Description

JavaScript

JavaScriptResult

Creates a JavaScriptResult with specified content.

AjaxLocalRedirect

AjaxRedirectResult

Creates an instance of AjaxRedirectResult while checking if url is local. In case of local url the redirect is performed to specified url. Otherwise creates response for redirecting to application's root.

AjaxRedirect

AjaxRedirectResult

Creates an instance of AjaxRedirectResult that checks that request has ajax nature and performs redirect to Url via ajax instead of normal redirecting.

PreviousHttpNextJson

Last updated 2 years ago

Was this helpful?