I want to create an ajax file manager like CKFinder and MoxieManager using Asp.Net!
can anyone help me how to start ?
please suggest me some useful references , components and tips ...
If there is an open source project like what I need, please let me know.
You first start with a simple file manager (no ajax), that simple reads the files from the disk and renders them on a page. If you place all that inside an iframe dialog, then you have something like ajax for your page.
Some examples with the code and details:
Simple-Web-File-Manager
Web File Manager
ASP.NET User Control: File Browser
and you can call them from your page, using the highslide iframe dialog content example.
After you make that and you have some knowledge you can move to ajax (if you still need it)
Related
i have to add one page to an existing asp.net webforms website.
this will be added at runtime and i'm not allowed to redeploy the entire webapplication / website.
is the (recommended or only) solution to move the code behind code to the aspx file, or do i have other options?
i can't put code in the dll's, and dynamicly runned .cs files are only in the case of a website and not in the case of a webapplication, am i right?
and putting the code from my code behind in de aspx file will always work?
actually as long as their page link to yours via URL you web page doesn't necessary have to be in the same project, unless you're trying to reuse something.
Else technically your project is fine as a standalone and they can just link to yours.
Unless you're worried about the URL then you would have to either use an iframe or some other URL rewrite.
Just for reference: One solution would be to use a dynamic proxy and intercept and extend the existing webapp. Though this approach might be a little too involved for what you're trying to achieve.
LinFu
Castle
I m developing asp.net application in which I m opening HTML page that is stored on client machine on that page I have a link which will open aspx page on server, On that aspx page I have a button that will open another html page stored on client machine.
Since I m new to web development Plz help me and suggest me some solutions for this ASAP.
Thanks....
Edited to add:
Is it possible to navigate between HTML Pages on Client machine and ASPX pages on server without uploading HMTL file on server. Can I use some javascript code on aspx page to open my locally stored HTML page...
try this
click to open whatever
The only way you can access files on a client's machine is by them uploading it to you.
You cannot do this reliably, because the server doesn't know where the HTML page is (what drive, what directory).
If you explain why your are trying to do this, perhaps we can suggest an alternative design.
Not quite sure what you are asking, but should create an open file dialogue. If you want the ASPX page to read the HTML file on users local machine then you need to upload it.
If I understand correctly, you have 2 problems:
you need to redirect from your aspx page to a local html page
you need to redirect from a local html page back to your server page
To solve nr 1 you will need to know the absolute location path to the html page on the client machine (ie. C:\SomePath\LocalFile.html) then do a link there:
<a href="file:///C:\SomePath\LocalFile.html">
And no, it's not possible to access local files from javascript.
At most you can ASK the user to point to the local file (ie.via a file upload input) then intercept that event and use the path to that file.
window.location.href=document.getElementById('fileInput').value;
but even that is riddled with problems as it will not work in some browsers,etc.
To solve nr2 you will probably need to add some javascript (which by default is turned off for local html files!!) and use "history.previous" to detect the path to your public aspx page. Something in the order of :
window.location.href= history.previous.replace("myfirstpage.aspx","redirectedpage.aspx");
which will send someone that came to the current page from ,say, "http://www.publicserver.com/myfirstpage.aspx", will be redirected to "http://www.publicserver.com/redirectedpage.aspx",
I have a update panel, in the update panel I have fileupload control and button control, On button click, I need the file that I have upload in the fileupload control in updatepanel.
Exact scenario, I have 8 tabs on page, each tab contains too much information, One of the tab is Attachment, when user click on Add New Attachment Modal Popup shown, Modal contains detailsview in Updatepanel and in the detailsview I have fileupload control, when user hit save button, detailsview inserting event fired, In the inserting event I need the file that I have upload.
Please Note, My page is heavy and I don't want full postBack.
Does anyone have solution of this issue?
Advance thanks for your kind help.....
For solve this problem, Please see the following step.
Add ajax-upload to your detail view.
iframe-based uploader like Resource#1.
Silverlight-based & Flash-based uploader. I like this technique because it doesn't require any server-side script for display current upload status. But in HTML5, you can create this without using any web browser plug-in.
Commercial uploader like Resource#2. that use hidden iframe for uploading.
Upload file to temporary location.
System response the temporary location. Next, client keep temporary location in hidden input in detail form.
Keep temporary location with session_id. You can store it in database or Session variable depend on your framework.
When you click on the save button, the system will move the files to their real location
Note. System will automatically delete the expired file from the temporary location.
Resource
ASP.NET File Upload with Real-Time Progress Bar
ASP.NET File Upload like GMail (Commercial)
Update
After almost one year, I just found a great 3rd-parties control for this question. This is an open source plug-in of jQuery. It name Plupload that allows you to upload files using HTML5, Silverlight, Flash or normal forms and it provide some unique features such as upload progress, image resizing and chunked uploads.
You can try & test Plupload by click here.
Can't be done without co-operating binaries being installed on the client. There is no safe mechanism for an AJAX framework to read the contents of a file and therefore be able to send it to the server. The browser supports that only as a multipart form post from a file input box.
The problem is with the way the HTML file upload control works, has nothing to do with ASP.net, for the file upload control to work you need a full post of the form data. You can only simulate that your are not doing a full postback, by doing all the operation in a hidden iframe that does the actual uploading
The sites you see that do provide this functionality generally use flash or an iframe so that the postback occurs in the iframe and gives the illusion of an ajax request.
HTH
OneSHOT
I've tried swfupload (http://swfupload.org/), but do keep in mind that you have to jump through hoops if you're using forms authentication with non-IE browsers. This is apparently a flash bug, and it's not fixed in flash 10. I decided against using it in our framework because of this bug, but it was otherwise a great product.
I recommend the uploader widget from YUI. See http://developer.yahoo.com/yui/uploader/
I think you could use it to accomplish your goal. Your javascript would need to fetch the file back down to the client from the server after it completed its upload. But the page would not refresh--the upload is through flash and a hidden iframe. The download to show the file's contents to the user would be via ajax.
If the user does not "approve" the upload, then simply make another ajax call to the server to delete the file.
I have an ASP.NET web page where i need to show a flash movie. the flash movie file name i will get dynamically in my code behind code.Now i want to load this file name to the flash object from code behind. Whats the ways to do this ? Is there any other method i can render a flash movie in a web page other than the OBJECT tag ?
Is there anything to do with a ajax cal here ? any performance improvement we can achieve ?
I suggest using a javascript library called SWFObject. Then, from your code behind you can register a startup script using the client script manager that loads the movie that you want.
Here is a link to the project: http://code.google.com/p/swfobject/
I would recommend that you combine client and server side code on this. It's not an extremely clean solution; however, it probably will help meet your needs.
I would recommend using jQuery and some of it's Flash Plug-ins on the client side. Then in the server I'd just RegisterClientScriptBlock that would set the properties of the flash movie as you need them.
Here's a link to a jQuery Flash Plugin
I am building a Flex Application that calls a .aspx page on the same webserver which builds a PDF report using SQL Reporting Services. When the report is built it prompts the user to open or save the PDF.
We are trying to find a way to display a Progress Bar to let the user know that the report they requested is being built, and then destroy the Progress Bar once the report is finished being built.
I've tried opening a new window using JavaScript and trying to catch when the window closes, as well as trying XMLHTTPRequest, but nothing to seems to work.
Does anyone have any suggestions?
There are 2 options:
Use the FileReference class in Flex to programmatically invoke your aspx file. You will be able to track the progress of the call from within Flex by listening to its events. But the users can only save the PDF, not open it.
Have an intermediate HTML page that displays a loading icon and then refresh itself to your PDF generating ASPX page. Encode your aspx url along with parameters etc and set it as a parameter to this intermediate page so it knows what to load.
If you don't have control over the page to be able to put JavaScript on it to hit a URL (or call back to the parent/opener), then you might consider whipping up an aspx page of your own to host a ReportViewer control, and display the report inside of that. This would require you to create a .NET website with a page and a web.config - you wouldn't need to do more than make it receive any parameters your report needs, and it would be do-able via inline-to-the-aspx code as opposed to requiring in-depth .NET knowledge.
Or, you could hit the SS-RS API and render the report directly. Here, you'd craft a URL with parameters for the report on the SS-RS API site to accept. I think, though I don't know for sure, that the SS-RS UI uses the API itself behind the scenes. By default the API is hosted in a site called "reportserver" - you might sniff HTTP traffic while the report is being rendered to get you started with the URL that you'd need to hit.
Another option not mentioned here is to create a .Net webservice, add it to your flex project and when it hits the result handler you know the file is created at that point.