I am new to asp.net and frontend technologies in general. I have the following code:

    @foreach (var item in Model)
            <img src="@item" alt="file here" width="100" height="100" />
            <a id="@item" href="#" onclick="deleteFile('@item');">Delete</a>

    function deleteFile(item) {
        var url = "/Home/DeleteFile";
        $.post(url, { Name: item }, function (data) {
            window.location.href = "/Home/Upload";

I know we can recognize the language in which the script is written by the type tag. E.g.

<script type="text/javascript"...

But without this type specified, how can I recognize the language of the script? Further in the script, what is the argument "function(data)" in the post statement doing and where is the data argument for that function coming from?


Related posts

Recent Viewed