Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Filip Vukovinski
    @vukovinski
    sure you can plug into the aspnet core pipeline with some class
    the complexity of your model validator depends on the complexity of your object model
    the pipeline ends if a piece of middleware writes to the body
    and you can pass state between different middleware
    i'm not sure if there is any specific aspnet core validation class or interface to implement
    Ivan Milosavljevic
    @Vertygo
    @vukovinski that is true but I would prefer to tap into existing Model Validation inside of aspnet core pipeline than having to write middleware
    William Roseberry
    @RoseberryPi

    Haven't worked with Razor Pages apps before and I'm having trouble getting a form inside of a partial view to work. Submitting the form is not calling the OnPost method at all. Not sure what I'm doing wrong. Or how it's supposed to be done.

    Anyone have a link for creating forms specifically in a partial view?>

    William Roseberry
    @RoseberryPi
    Nevermind. I didn't realize that the partial view is not connected to its viewmodel but of the page's view model... Blazor has spoiled me much
    Alberto Passalacqua
    @AlbertoPa
    hint: View Components are also an option if applicable, and can doa bit more than partial views
    William Roseberry
    @RoseberryPi
    I'll have a look into those
    sadly they didn't make them JS-friendly, and favored that mess of Blazor Server integrated in MVC
    Arnas Kučinskas
    @Arnas-Kucinskas
    Is it possible to execute JS in .cshtml @{} block?
    Or only after code block is executed you can execute js?
    TeBeCo
    @tebeco
    js is executed in the browser
    html rendering is done by the server
    you can put js code inside razor page/template etc...
    but it's not going to execute somewhere else than the user loading the page on it browser and the code being called
    Arnas Kučinskas
    @Arnas-Kucinskas
    With Blazor components (.razor) I can call JS before rendering occurs (at least visually) in OnInitialize method.
    Trying to find out if I can do something similar in cshml forms. For example call local storage and then adjust variables in C# code.
    Sorry for late response.
    @tebeco
    TeBeCo
    @tebeco
    ok was not sure if it was razor on server side or blazor my bad
    i was confused with the @{} i guess
    can't tell for blazor specific life cycle
    Arnas Kučinskas
    @Arnas-Kucinskas
    It is on server side. Blazor was just an example, on how it works there.
    So from this I gather that it is not going to happen on server side?
    duckblaster
    @duckblaster
    yes, all cs runs before any js in .cshtml
    William Roseberry
    @RoseberryPi
    Does Razor Pages' partial views have support for an equivalent to Blazor's renderfragments in child components?
    Raif Harik
    @reharik
    Hello, I'm trying build an old .net 4.5 mvc app on ubuntu and I can't seem to figure out how to get the 4.5 framework. Can anyone help me?
    TeBeCo
    @tebeco
    you can't get the framework there
    it's windows only
    the only thing you can do is to reference nuget packages named Reference Assemblies
    and that will let me build
    but no test to run
    there's no runtime for netfx on linux
    only dotnet core
    Raif Harik
    @reharik
    ug, so there's no way to work on this application?
    TeBeCo
    @tebeco
    you can "build" only
    there's also Mono but i'm not sure you can have it out of the box compliant
    Raif Harik
    @reharik
    oh, so I can build but I can not run the app and access it in the browser?
    TeBeCo
    @tebeco
    exactly
    reference assembly are empty dll
    Raif Harik
    @reharik
    so with mono, what do you mean out of the box compliant?
    TeBeCo
    @tebeco
    it gives you something to compile against
    because like dotnet core mono runs on linux
    and i have no clue if you can make an app use mono as a runtime when you target netfx and do no code vu ange
    Raif Harik
    @reharik
    so is there any work around so I can run the app and see if it works?
    maybe, can you run windows in a container?
    TeBeCo
    @tebeco
    anyway today mono is not integrated in the runtime
    net4.5 was in 2010
    it's plain dead
    migrate the app is advise number 1