Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > BOOK: Beginning Visual C# 2005
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Visual C# 2005
This is the forum to discuss the Wrox book Beginning Visual C# 2005 by Karli Watson, Christian Nagel, Jacob Hammer Pedersen, Jon D. Reid, Morgan Skinner, Eric White; ISBN: 9780764578472
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 23rd, 2007, 09:29 AM
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Larryz
Default what is asp.net

i am trying to do my mcad, with c#.....

i am confused i know the c# and j# for example can be used
to created websites with extensions aspx...

But what is asp.net...

c# can produce windows apps, so is not tied to .net.....

asp:button is that .net, i know there is more to it than this...

but i am trying to break it down into asp languages and what the other
bit is i am unsure..

Larry

Reply With Quote
  #2 (permalink)  
Old April 23rd, 2007, 08:24 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

ASP.NET is the predecessor to the outdated ASP 3.0 Scripting language.

Where ASP was an interepeted language and *everything* was an object, asp.net is a compiled language which is much more akin to "real" programming then ASP was.

What I mean by real is having the ability to work with types and the like and not just declaring everything as an object so, to visualize:

ASP (VBScript)
Dim sValue
sValue = "This is a string"

ASP.NET (VB and C#)
Dim sValue as String = "This is a String"
string sValue = "This is a string";

So, essentially, ASP.NET is the replacement for ASP and as such it does not require the user to have the .NET framework installed on their machine, it simply must be installed on the server and IIS must be configured to execute aspx files.

By default, if IIS is already installed when you go to install the framework this will be done automatically but, if the framework is installed before iis you need to run a command prompt (start --> run --> cmd) navigate to the .NET folder (typically %systemdrive%\windows\microsoft.net\framework\[version]) once there execute aspnet_regiis -i which will configure IIS to execute aspx pages.

This line I don't understand: "c# can produce windows apps, so is not tied to .net....."

So I am not sure if you mean to imply that C# is not tied to ASP.NET or that ASP.NET is not tied to the .NET Framework?? But, in any case, C# can be used to develop windows apps, WindowCE apps, Web Services, asp.net applications, etc. (The same goes for VB.NET or J#)

<asp:Button id="btn" runat=server /> is ASP.NET and when placed on a Web Form it will render an plain old HTML button at run time and, you are correct, there is much more to it then this but its really outside the scope of one thread to break it all down. (Wrox has numerous books on this subject that you might want to check out)

hth^^

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #3 (permalink)  
Old April 24th, 2007, 07:53 PM
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Larryz
Default

Thanks that was a good explanation...... But...
I was wondering by learnng visual c#, which can be used to develope asp.net applications..... Are you learning asp.net and c# or bits of both..

i am trying to understand ok i can learn language, but what bits of it make it asp.net and what bits make it just part of the language....

for example int i; that could be used in an asp.net application... it doesnt do much but you can be sure that some integers will be declared in most application... windows or otherwise....

What i mean is c# is not asp.net... nor is vb6..... so what is it..

Larry...

Reply With Quote
  #4 (permalink)  
Old April 24th, 2007, 09:19 PM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Ok. C# is a language (as is VB, J# etc) all that that is is a bunch of Syntax that when executed inside of the .NET framework does some task.

ASP.NET on the other hand is a TECHNOLOGY that allows us to do different things on the web that simply are possible with HTML, DHTML, etc. By learning visual C# you are learning visual C# and the book will dictate in what context you are learning it (Platform Based vs Web Based) but once you know C# there are only slight difference's between writing a windows app and an ASP.NET app.

For example, you can't try to spawn a form from the the System.Windows.Forms Assembly in an ASP.NET application.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #5 (permalink)  
Old April 25th, 2007, 07:46 AM
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Larryz
Default

thats great... i was stuck on that for a while cheers.. I guess its self evident really, due to books on c# and asp.net, the same title with vb, etc.. Asp being the constant.

thanks a lot...

i wonder if i may as you a few more questions.

What is a interface in terms of oop..... i have just started and having problems with all this. i have worked out what a class is, and done some coding but cant figure out this interface thing..... its just as abstract as some of the other terminology at the moment....

thanks for all your help

Larry

Reply With Quote
  #6 (permalink)  
Old April 25th, 2007, 08:17 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

This is a good read in understanding Interfaces.
http://www.c-sharpcorner.com/UploadF...7-54717ef3b345

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #7 (permalink)  
Old May 3rd, 2007, 04:16 AM
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Larryz
Default

Its seems that when you create a new object of your own design
certain methods seems to be defined automatically for it....

ToString() for example...

This is confusing, for me at least..

You can do things like myObject.ToString();

What is this doing...

why do you want to do that

i mean if you have an object, which is an instance of a class
this is odd..

why say for example myObject.Name, here you force the object to
return the Name field using the get { return name }, for example.

or you can call other defined publicly available methods. which you define and implement...

So why then allow myObject.ToString() although not implemented in object... it doesnt make sense to me... myObject.ToString() its like trying to convert the entire thing to a string.. and for what purpose..

Also the books says abstract classes cant be instantiated but
what does that mean.... I thought it meant you cant create an instance of it...but only derive from it... but you are partly creating and instance of it when you store fields values in it.... via a derived object.

Larry confused again , no change there then.. :)

Reply With Quote
  #8 (permalink)  
Old May 3rd, 2007, 06:48 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

hmm. About your class, are you deriving it from another class? Because, given this code:

using System;
using System.Collections.Generic;

namespace foo
{
    class foo
    {
    
    }
}

The only properties that I can access through something like

{
foo.[property]
}

is Equals and ReferenceEquals (which determines if 2 objects are equal) BUT if i change my class to this

namespace foo
{
    class foo
    {
        public static string fooString()
        {

        }
    }
}

I can do

foo.fooString().ToString(); (This is obviously pointless since fooString returns a string but, at this point, you are accessing all of the properties of the string type since that is what the function returns)

I hope that helps you.

Abstract Classes, as you said, can not be instantiated they MUST be inherited. By inheriting from an abstract class you are not instantating it but doing this:

MyClass foo = new MyClass();

Where MyClass is marked as abstract, this line of code will throw an error since are you explicitly instantiating the object with the intent to work with it directly as opposed to inherting from it.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
  #9 (permalink)  
Old May 3rd, 2007, 10:26 AM
Authorized User
 
Join Date: Apr 2007
Location: , , .
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Larryz
Default

So when you create a basic class,
For example
namespace mynamespace
{
public class myClass
{
 public string Name;
get
}
return name;
}
set
{

name = value;
}
public myClass()
{
//default constructor
}
public myClass(string objName)
{

}
}


here no methods have been defined, purposely....

Later we can try in console application....

class Program
{
static void Main(string[] args)
{
 myClass myObj = new myClass("Fred");
myClass.ToString();
// is possible because of inheritance ???????

}
}
}


}

Reply With Quote
  #10 (permalink)  
Old May 3rd, 2007, 11:00 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I am sorry, no. I misunderstood you. In my example I was referencing the static properties of my foo object in the above code.

When You create an instance of an object and then call the .ToString() method, what this does is it gives you a human readable string of what the object is.

For example doing:
Object o = new Object();
Console.WriteLine(o.ToString());

Will print out System.Object.

On the flip side:
int i = 0;
Console.WriteLine(i.ToString());

will return 0.

In your example above, calling .ToString should return: mynamespace.myClass

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET 3.5 answers in Professional ASP.NET 3.5 jminatel ASP.NET 3.5 Professionals 1 August 22nd, 2011 07:34 AM
Turning a regular ASP.NET App into an AJAX ASP.Net donrafeal7 Ajax 2 August 31st, 2007 12:33 AM
Database diagram in .net using asp.net,c#.net scotttiger ADO.NET 2 February 16th, 2005 01:35 AM



All times are GMT -4. The time now is 10:30 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.