7/9/2023 0 Comments Simplefile download![]() Īlso another thing now bugs me - can I actually add some ASP tags to the aspx page from the cs file ? I mean, like in PHP there was no problem in doing something like echo 'general, the best way to do this is to use a PlaceHolder control on your ASPX page and then add any additional controls to the PlaceHolder object in the code-behind. You want to put any controls that you build from the code-behind. Additionally, since ASP.NET is object-oriented, you have to explicitly determine where For ASP.NET, all of the code including the ASPX/HTML page is compiled and then processed through the rendering engine of the web server. PHP is all intepreted (like classic ASP) where the file is read hierarchically and render to HTML With respect to adding controls from the code-behind (CS file), you can, but you have to realize that ASP.NET has a different paradigm compared to PHP. I'm still working on doing URL rewriting dynamically, but I haven't gotten far with it ![]() I know that with IIS 7, you can define it directly through the IIS Manager, but it's static. Note, however, that you cannot do this with a file project in VWD because it's doesn't use IIS it uses the built-in web server and expects everything directly accessible to the web toīe in the root directory of the web application.Īs for URL rewriting, I'm trying to get a handle on it myself. Path and something like "Downloads" as your virtual folder name. So, in IIS, you would create a virtual directory from your web applications using C:\uploads as the physical If you want to use your C:\uploads directory for your downloads as well, you can define C:\uploads as a virtual directory under your application. Is this in general even thinking in a good way ? Please share your thoughts :) Just the filename to get a specific file for download. Is lame and I'm trying to learn something while doing this )īesides some mapping I'd also like to say generate some checkboxes or similar, so that when a user logs in and has 10 files that are listed, the user could be able to check 5 of those files and click some sort of "download selected" button as well as click So far I'm doing everything on localhost and I won't have to put the app in the web to pass my class, but accessing the files with a local path like "C:\Uploads\username\filename" With a foreach loop, but I think I need some sort of mapping physical location to some urls. I'm just not sure what path should I take in now all I came up with is that I can get the file list using the DirectoryInfo and FileInfo objects and list those I did a very similar thing in PHP before, so I have a general idea on sessions etc. My question therefore is - how to do it in a simple and elegant way, so that I of course understand what I am doing ? :) I have a simple mechanism that allows to upload files (which are thrown to a specific location under a folder that's named after the user's name) and now I'd like to make some sort of listing of the user's files with some mechanism allowing to download theįiles earlier stored. During last 2 weeks I've managed to make a simple set of aspx sites with a master page, up to now my web app allows to register an account, activate it with a link sent via email,Īfter which one can login to the "main" page. The general idea is simple - I'm creating a simple file storage service. Here is the deal : I chose ASP.NET as the technology for my class and I'd like to ask for a general "howto" advice on what I want to do in my simple web app. I'm fairly new to ASP.NET, so please be understanding :)
0 Comments
Leave a Reply. |