[.net] Migrating from PHP to ASP.NET
Hey everyone, I had 2 questions. One, I'm just kicking off ASP.NET (I'm a PHP kind of guy ;) ) and was wondering if you guys knew any great tutorials I could start off with that would teach me the basics (defining variables, etc.). I'm also trying to figure out how to make a downloader script with ASP.NET.
I know in PHP you could do it by header("Content-type: image/jpeg"); header("Content-Disposition: attachment; filename=test.jpg"); readfile("...");
How would I do that for ASP.NET? Thanks :)
This is your 2nd programming related post in the lounge, which is far from being the best location.
You should post this in either the .NET Forum or the Web Development Forum.
These forums are much better suited for this kind of posts, and will get you a reply much faster. Don't repost, flag your post to be moved to either of this forum by clicking "Report".
Toolmaker
You should post this in either the .NET Forum or the Web Development Forum.
These forums are much better suited for this kind of posts, and will get you a reply much faster. Don't repost, flag your post to be moved to either of this forum by clicking "Report".
Toolmaker
asp.net has some great official tutorials as the official home of asp.net
however, as a ASP 3 guy (give me time, I can make ANYTHING), I have had real trouble migrating, and I simply have failed to understand it, and would love to see some better tutorials / better books, All the books I have bought/borrowed/read are for newbies, and as someone who has already used asp, I just get confused and come out asking more questions!
however, as a ASP 3 guy (give me time, I can make ANYTHING), I have had real trouble migrating, and I simply have failed to understand it, and would love to see some better tutorials / better books, All the books I have bought/borrowed/read are for newbies, and as someone who has already used asp, I just get confused and come out asking more questions!
Ok, I'll remember to put this in the webdev forum from now on. :)
And yes I have to agree. There really arn't any good tutorials on "How to get started" like that explains how to call classes, use variables, etc. I can kind of guess on some of these things. Like I know how to make a class in asp.net 2.0 but I don't know how to use it (like how to init it and call it's functions, probably in a classname->functionname menthod but again I don't know).
And yes I have to agree. There really arn't any good tutorials on "How to get started" like that explains how to call classes, use variables, etc. I can kind of guess on some of these things. Like I know how to make a class in asp.net 2.0 but I don't know how to use it (like how to init it and call it's functions, probably in a classname->functionname menthod but again I don't know).
For learning .NET I though the book "Beginning Visual C#" published by the WROX press was a GREAT starter book. The reason is, it intentional titled the book "Visual C#" because it wanted to cover the Tool (Visual Studio) the Language (C#) and the Platform (.NET), and starting out (Beginning). So it goes over what the .net framework is, and shows you the low level crazyness like IL and ILDASM and gacutil ... and then it goes over core programming (in C#), variables, loops, classes, etc. Showing you the steps like making the Visual Studio projects and such along the way. Then on to the various parts of the .NET library - ADO.NET, WinForms, XML, ASP.NET, Web Services, etc.
I bought the Version that covered 1.1, so I don't know if there is a newer version and if it is any good.
As for the Content-type stuff in the OP. You do it the same way in ASP.NET. The headers are accessed via the "Response" object. In fact if you need to start digging through MSDN for things keep the following in mind:
Response (a singleton like instance of HttpResponse)
Request (a singleton like instance of HttpRequest)
Server (a ... ... ... of HttpServer) - see a pattern yet.
Session (the session object - for managing session variables, such as user info, themes, etc)
ViewState (the viewstate object for managing page specific view-state variables, such as current sort order)
I bought the Version that covered 1.1, so I don't know if there is a newer version and if it is any good.
As for the Content-type stuff in the OP. You do it the same way in ASP.NET. The headers are accessed via the "Response" object. In fact if you need to start digging through MSDN for things keep the following in mind:
Response (a singleton like instance of HttpResponse)
Request (a singleton like instance of HttpRequest)
Server (a ... ... ... of HttpServer) - see a pattern yet.
Session (the session object - for managing session variables, such as user info, themes, etc)
ViewState (the viewstate object for managing page specific view-state variables, such as current sort order)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement