Click to See Complete Forum and Search --> : Simple C#/Asp.net Tutorial


bryceray1121
05-10-2009, 04:24 PM
I'm trying to pick up a little knowledge on using c#/asp to create web applications. I've not been able to find very many resources online. But i did find one online tutorial. The problem is, that the tutorial does not seem to compile as is.
http://webproject.scottgu.com/CSharp/

However, i'm having some difficulty with it. First off its for Visual Studio 2005 and i'm running 2008 so that may be the issue.

My question: where does the Add method come from in the third image(class called publishers). It is referencing Add and i'm not sure i'm just supposed to create my own add method in the author class or if it is supposed to be a function built in to visual studio.



Another problem i'm having with the tutorial:
Whenever i add the prebuild event command, in the user control section of the tutorial, it creates an error.

Is this a valid command for Visual Studio 2008 (tutorial is for 2005)?
copy $(SolutionDir)MyUserControlLibrary\*.asc... $(ProjectDir)UserControls\

I removed a slash from after(solutiondir) and (projectdir) b/c the solution and project directories already have slashes at the end so it was double slashing it.

This is the error i'm receiving:
Error 3 The command "copy (Removed - File Stucture)\WebApplication1\MyUserControlLibrary\*.ascx (Removed - File Stucture)\WebApplication1\WebApplication1\UserControls\" exited with code 1. WebApplication1

Thanks for your help,
Bryce

RivkaS
05-25-2009, 10:17 PM
1) a very good c# tutorial with (mostly) working examples can be found here:
http://www.functionx.com/csharp2/
or take this link http://www.functionx.com/csharp/index.htm
and next
http://www.csharp-station.com/Tutorial.aspx
I have not tried this one, but it looks good to me
http://csharp.net-informations.com/ ("http://csharp.net-informations.com/)
and this looks also useful
http://www.softsteel.co.uk/tutorials/cSharp/cIndex.html

that should keep you busy for a while.
Now, if you have money to spare, here you go: http://www.learnvisualstudio.net/default.aspx
I bought it this weekend, and it is fantastic, the best I have seen or heard.

Next to your question about the difference between VS05 and VS08. I have worked with both parallel for a year now (school demanded it) and the differences are minimal. You can use code from 2005 and put it in 2008 and if you have a ready project there is a neat conversion tool that will guide you in no time through the process.

For your last question: I did not see the Add function you are talking about. Could you give a link? Maybe I can help you.