Click here to Skip to main content
15,895,142 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Unity source version control experiences? Pin
ZurdoDev16-Sep-19 3:58
professionalZurdoDev16-Sep-19 3:58 
QuestionSignalR Connection Problem - Version Mismatch Pin
Kevin Marois8-Aug-19 7:58
professionalKevin Marois8-Aug-19 7:58 
AnswerRe: SignalR Connection Problem - Version Mismatch Pin
Member 1291556124-Sep-20 13:19
Member 1291556124-Sep-20 13:19 
QuestionAsp.Net Web API Installer Pin
Kevin Marois5-Aug-19 5:52
professionalKevin Marois5-Aug-19 5:52 
QuestionCan someone help me understand this error? - HTTP Error 403.14 - Forbidden Pin
GungaDin161-Aug-19 6:45
GungaDin161-Aug-19 6:45 
AnswerRe: Can someone help me understand this error? - HTTP Error 403.14 - Forbidden Pin
ZurdoDev1-Aug-19 8:07
professionalZurdoDev1-Aug-19 8:07 
AnswerRe: Can someone help me understand this error? - HTTP Error 403.14 - Forbidden Pin
Regina Hawk13-Aug-19 4:31
Regina Hawk13-Aug-19 4:31 
QuestionI keep getting error $(...).fileupload is not a function. Pin
KGr2830-Jul-19 4:38
KGr2830-Jul-19 4:38 
When I run the code by itself(Index.cshtml), I don't get an error and everything works but when I try to make it a partial view in my details.cshtml page with
Html.RenderAction("Index", "FileUpload");
I get $(...).fileupload is not a function.

Code:Index.cshtml

@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>index</title>
    <link href="~/Content/FileUpload/FileUpload.css" rel="stylesheet" />
</head>
<body>
    <div class="upload">
        <div>
            <form id="upload" method="post" action="/FileUpload/UploadFiles" enctype="multipart/form-data">

                <div id="drop">
                    <a>Upload File</a>
                    <input type="file" name="upl" multiple id="fileuploader" />
                </div>

                <ul>
                    <!-- The file uploads will be shown here -->
                </ul>

            </form>
            <script src="~/Scripts/jquery-3.1.0.min.js"></script>
            <!-- JavaScript Includes -->
            @*<script src="~/Scripts/jquery.knob.js"></script>*@
            <script src="~/Scripts/FileUpload/jquery.knob.js"></script>
            <!-- JavaScript Includes -->
            <!-- jQuery File Upload Dependencies -->
            @*<script src="~/Scripts/jquery.ui.widget.js"></script>*@
            <script src="~/Scripts/FileUpload/jquery.ui.widget.js"></script>

            @*<script src="~/Scripts/jquery.iframe-transport.js"></script>*@
            <script src="~/Scripts/FileUpload/jquery.iframe-transport.js"></script>

            @*<script src="~/Scripts/jquery.fileupload.js"></script>*@
            <script src="~/Scripts/FileUpload/jquery.fileupload.js"></script>

            <!-- jQuery File Upload Dependencies -->
            <!-- Main JavaScript file -->
            @*<script src="~/Scripts/script.js"></script>*@
            <script src="~/Scripts/script.js"></script>
            <!-- Main JavaScript file -->

        </div>
    </div>
</body>
</html>



Controller:

public class FileUploadController : Controller
    {
        // GET: FileUpload
        [ChildActionOnly]
        public ActionResult Index()
        {
            return PartialView();
        }

        [HttpPost]

        public void UploadFiles()
        {
            if (Request.Files?.Count > 0)
            {
                var filesCount = Request.Files.Count;
                for (int i = 0; i < filesCount; i++)
                {
                    var file = Request.Files[i];
                    var fileName = Path.GetFileName(file.FileName);
                    var path = Path.Combine(Server.MapPath("~/Uploads/"), fileName);

                    file.SaveAs(path);
                }
            }
        }



Code:Details.cshtml

@{.
  .
  Html.RenderAction("Index", "FileUpload");
    }

AnswerRe: I keep getting error $(...).fileupload is not a function. Pin
Afzaal Ahmad Zeeshan30-Jul-19 5:41
professionalAfzaal Ahmad Zeeshan30-Jul-19 5:41 
GeneralRe: I keep getting error $(...).fileupload is not a function. Pin
KGr2830-Jul-19 7:35
KGr2830-Jul-19 7:35 
GeneralRe: I keep getting error $(...).fileupload is not a function. Pin
Afzaal Ahmad Zeeshan30-Jul-19 8:55
professionalAfzaal Ahmad Zeeshan30-Jul-19 8:55 
GeneralRe: I keep getting error $(...).fileupload is not a function. Pin
KGr2830-Jul-19 9:12
KGr2830-Jul-19 9:12 
GeneralRe: I keep getting error $(...).fileupload is not a function. Pin
Afzaal Ahmad Zeeshan30-Jul-19 12:28
professionalAfzaal Ahmad Zeeshan30-Jul-19 12:28 
GeneralRe: I keep getting error $(...).fileupload is not a function. Pin
KGr2831-Jul-19 3:38
KGr2831-Jul-19 3:38 
GeneralRe: I keep getting error $(...).fileupload is not a function. Pin
Afzaal Ahmad Zeeshan31-Jul-19 8:17
professionalAfzaal Ahmad Zeeshan31-Jul-19 8:17 
GeneralRe: I keep getting error $(...).fileupload is not a function. Pin
KGr2831-Jul-19 8:19
KGr2831-Jul-19 8:19 
QuestionHow to generate complex Multi-Color-Gradients with PHP? Pin
Member 1453705321-Jul-19 8:23
Member 1453705321-Jul-19 8:23 
AnswerRe: How to generate complex Multi-Color-Gradients with PHP? Pin
Richard MacCutchan21-Jul-19 21:13
mveRichard MacCutchan21-Jul-19 21:13 
QuestionWhen trying to reload DataTable I get error:Uncaught TypeError: Cannot set property 'data' of null Pin
KGr289-Jul-19 4:49
KGr289-Jul-19 4:49 
AnswerRe: When trying to reload DataTable I get error:Uncaught TypeError: Cannot set property 'data' of null Pin
Afzaal Ahmad Zeeshan30-Jul-19 8:59
professionalAfzaal Ahmad Zeeshan30-Jul-19 8:59 
QuestionPerforming Ajax on dataTable where checkbox is clicked Pin
KGr288-Jul-19 7:54
KGr288-Jul-19 7:54 
AnswerRe: Performing Ajax on dataTable where checkbox is clicked Pin
ZurdoDev8-Jul-19 8:06
professionalZurdoDev8-Jul-19 8:06 
GeneralRe: Performing Ajax on dataTable where checkbox is clicked Pin
KGr288-Jul-19 8:09
KGr288-Jul-19 8:09 
GeneralRe: Performing Ajax on dataTable where checkbox is clicked Pin
KGr288-Jul-19 8:58
KGr288-Jul-19 8:58 
GeneralRe: Performing Ajax on dataTable where checkbox is clicked Pin
ZurdoDev8-Jul-19 9:07
professionalZurdoDev8-Jul-19 9:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.