Where is the main method in a web project ? [Resolved]

Posted by Akiii under Others on 11/10/2011 | Points: 10 | Views : 2858 | Status : [Member] | Replies : 5
Hi all,

When we create a new web project in Visual Studio, we cannot find a main method there ? Can anyone explain it to me is main method only needed for .exe project ?

Thanks and Regards
Akiii




Responses

Posted by: Blessyjees on: 11/10/2011 [Member] Bronze | Points: 50

Up
0
Down

Resolved
Hi,

In web project you can't see the main method. You can set any page as the startup page. For this right click on the webform and click on " Set as a startup page".

Blessy Baby
Digitalmesh Softech pvt Ltd
https://blessybaby.wordpress.com/

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 11/10/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 50

Up
0
Down

Resolved
The Main method is only for Desktop Applications. It is used to set the startup Object for the Project. In a web application we dont have such static class or method. You create a webproject and pages and right click on a page and make it a startup Object.

Thank you for posting at Dotnetfunda
[Administrator]

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 11/10/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi Blessyjees,
Thanks for your reply. That means we need a main method in desktop applications or when we need a starting point of our application ?

Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 11/10/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi Vuyiswamb Sir,
Thank for your answer regarding my question.

Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 11/10/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
You are Welcome

Thank you for posting at Dotnetfunda
[Administrator]

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response