CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2005
    Posts
    568

    Web application using c#

    i'm first to create web application, i'm curious how can i create a web application in VS2005 with using C#... i found some sample in net, but the first step is always File->New Project, then choose ASP Web Application, but i can't find this choice in my dialog.
    In the New project menu, in the vs installed templates, there are only
    Windows Application
    Windows Controls Library
    Crystal Report Application
    Class Library
    Console Application
    Device Application


    Please help...

  2. #2
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: Web application using c#

    Hi,

    For VS2005 the model is slightly different for web applications. You will have to follow this path...

    File -> New Website

    This has changed again with VS2008 so you have the two options (i.e. Web Site and Web Application Project).

  3. #3
    Join Date
    Feb 2005
    Posts
    568

    Re: Web application using c#

    Quote Originally Posted by nelo View Post
    Hi,

    For VS2005 the model is slightly different for web applications. You will have to follow this path...

    File -> New Website

    This has changed again with VS2008 so you have the two options (i.e. Web Site and Web Application Project).
    ok, thanks...
    due to i'm first time writing web app, i'm not very sure how web application is really works...
    when i run the app, it will show a webpage... but it only can be compile as debug mode... there are no release mode for the compilation??
    is website application have kind of bin folder which storing the debug and release folder?? how open my website from windows instead using VS?

  4. #4
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: Web application using c#

    What is the different between Web Site and Web Application Project in VS 2008 ?
    Thanks for your help.

  5. #5
    Join Date
    Nov 2002
    Location
    .NET 3.5 VS2008
    Posts
    1,039

    Re: Web application using c#

    Quote Originally Posted by Peter APIIT
    What is the different between Web Site and Web Application Project in VS 2008 ?
    When you use the Web Site template Visual Studio allows you to point to a directory on your file system and everything in that directory is considered to part of the web site. There is no concept of a project or solution file which keeps a track of what is included/excluded from the project.

    When you use the Web Application template you get that concept of a standard project where you can specify which files should be included in the build. You can specify a number of project related properties like custom build steps, output directories, etc.
    On my personal projects I use Web Site. The advantage of the web application project is that you can easily keep a track of changes. This is very useful if you're working in a team.

    Quote Originally Posted by Isy
    when i run the app, it will show a webpage... but it only can be compile as debug mode... there are no release mode for the compilation??
    is website application have kind of bin folder which storing the debug and release folder?? how open my website from windows instead using VS?
    If you hit F5 you are asking the environment to run your site in debug mode hence there will be a compilation in debug mode. The web.config file has a setting that you can change when you want to deploy the site (<compilation debug="false">). Remember that any code files are compiled just in time. So there is no bin folder on your file system as such.

    How do you want open your website from windows? What do you mean? You can certainly browse to the directory where your files are (if you go with the default that would be something like ..\My Documents\Visual Studio 2005\Web Sites\<Your web site here>). If you want to access your website through the browser you have two choices. If you are using the Visual Studio development webserver (which is what it uses when you hit F5 or CTRL+F5) you would use a url like http://localhost:<port number>/<Your web site here>. The other option if you have IIS is to setup a virtual directory that points to the directory in the file system where your web site files are. As part of that you have full control over the url (i.e. it doesn't have to be called <Your web site>.

    I hope this makes things clearer

  6. #6
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: Web application using c#

    Too bad for VS 2005 does not have web application Project template.
    Thanks for your help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured