Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7032599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:57:22+00:00 2026-05-28T00:57:22+00:00

I got an .aspx file in which I want to have a file uploader

  • 0

I got an .aspx file in which I want to have a file uploader that I got from here. There are examples included how to get this to work. When I test it only do the HTML and javascript I can get it to work, but when I try to get it working with C# I can’t get the path to the .js file right.

The example html/javascript file is:

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="fileuploader.css" rel="stylesheet" type="text/css"> 
    <style>     
        body {font-size:13px; font-family:arial, sans-serif; width:700px; margin:100px auto;}
    </style>    
</head>    
    <script src="fileuploader.js" type="text/javascript"></script>
    <script>        
        function createUploader(){            
            var uploader = new qq.FileUploader({
                element: document.getElementById('file-uploader-demo1'),
                action: 'do-nothing.htm',
                debug: true
            });           
        }

        // in your app create uploader as soon as the DOM is ready
        // don't wait for the window to load  
        window.onload = createUploader;     
    </script>    
</body>
</html>

And I want to get it in the following .aspx file. The .js and .css file are in the D:\svn\Web\Framework\Trunk\test.Web.Framework\Scripts\fileuploader location and the .aspx file is in D:\svn\Web\Healthcare\trunk\test.Web.Healthcare\Areas\Framework\Administration\Entity. I tried to do the following, but this gives me a GET =1325724928825″>http://localhost:1304/Administration/blue/en-gb/Entity/Index/~/Scripts/fileuploader/fileuploader.js?=1325724928825 404 (Not Found) error:

<%@ Control Language="C#" Inherits="test.Web.Framework.Core.ViewUserControl<test.Web.Framework.Areas.Administration.Models.NoteModel>" %>
<% using (UI.koform(Model, null))
{ %>
    <div class="ui-state-highlight ui-corner-all highlight" data-bind="visible: meta.message">
        <span class="ui-icon ui-icon-info"></span><strong data-bind="text: meta.message">
        </strong>
    </div>

    Subject:
    <input type="text" data-bind="value:subject" />
    <span data-bind="text: subject"></span>
    <br />
    Text:
    <input type="text" data-bind="value:text" />
    <br />
    <!--
    <a href="#" data-bind="click:function(){setvalues() }">set values</a>

-->

    <div class="dialogButtons">
        <button onclick="$('#<%:Model.meta.modelname%>').koform('submit');">
            Save</button>
    </div>


    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link href="~/Scripts/fileuploader/fileuploader.css" rel="stylesheet" type="text/css">  
    </head>
    <div id="file-uploader-demo1">      
        <noscript>          
            <p>Please enable JavaScript to use file uploader.</p>
            <!-- or put a simple form for upload here -->
        </noscript>         
    </div>

    "~/Scripts/fileuploader/fileuploader.css"
    <script src="~/Scripts/fileuploader/fileuploader.js" type="text/javascript"></script>
    <script>        
            function createUploader() {
                var uploader = new qq.FileUploader({
                    element: document.getElementById('file-uploader-demo1'),
                    action: 'do-nothing.htm',
                    debug: true
                });
            }

            // in your app create uploader as soon as the DOM is ready
            // don't wait for the window to load  
            window.onload = createUploader;     
        </script>    

<%}%>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:57:22+00:00Added an answer on May 28, 2026 at 12:57 am

    Easy fix. Replace your hrefs with something like this…

    <script src="<%=ResolveClientUrl("~/Scripts/fileuploader/fileuploader.js")%>" type="text/javascript"></script>
    

    This will resolve the URL relative to your web application’s root folder. Do the same for your stylesheets and other references.

    I use this all over the place but particularly in Master Pages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have got .aspx and .aspx.cs files along with a web.config file; from these
I have an entry form which I want to add a file uploader I
Edit : I've got an aspx file (default.aspx) that loads a flash file (index.swf),
I have got this project that uses excel for some calculation. This excel is
I have a custom View Engine that derives from WebFormViewEngine. There's a lot of
I got below code from http://msdn.microsoft.com/en-us/library/dd584174(office.11).aspx for adding custom property in webpart tool pane.
when i search for open source for domain checker, i got this reference http://www.codeproject.com/KB/aspnet/DataScraping.aspx
I've got an ASPX page rendering a search ascx page which in turn will
I've got an ASP.net file, and I'm trying to include dynamic code which was
I have a few aspx pages which displays GridView controls. In each control I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.