I suggest you ...

asp.net mvc next version is a...

let cshtml file include a csharp dependent file like xaml file, it is a part of cshtml represent class,

this dependent cs file will be used to generate javascript for that owner cshtml's script.

pls reference sharpkit
http://sharpkit.net/
all js library mapping to net library(assembly) like jquery etc..
this library be refed to that dependent csharp file

for example:

using System;
using X.JQuery;

internal partial class Asp.Page_Views_XX_cshtml{
[JsType(XX,Name="onBtn1Click")]
public void onBtn1Click(XEventArgs e){
// your code logic use csharp code
}
}

we know the cshtml file will generated csharp class in temp assembly to temp dir by razor engine and mvc framework. so add this dependent file and partial class will not any problems,not any difficulty, this partial class content will to compiled a javascript file to this temp assembly.

i know you can ,pls do this,that is very great than typescript !

3 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    mao gang shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    Thank you for your suggestion! While we aim to respond to every suggestion, we are closing older ones that don’t have enough votes so newer ones from you can move to the top. If this suggestion is still important to you, feel free to open it again.

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base