Link to home
Start Free TrialLog in
Avatar of cenetadmin
cenetadmin

asked on

compile is not finding all of my errors.

when I do a build, the build is successful even though there are errors in the code...For example, I have a <asp:Button id="cmdUpdate" onclick="cmdUpdate_Click" runat="server" Text="update"></asp:Button>
but I have no code in the code behind page for the cmdUpdate_click...I don't see the error until I run the web app.  I assume there is some setting somewhere i am missing.  Just started using VS 2008.
Thanks
Avatar of Bane83
Bane83
Flag of Canada image

Tools > Options > Projects and Solutions > Build and Run

MSBuild project build output verbosity is probably set to "Quiet".  Switch it to Minimal to get normal error levels.
Also check other settings on that tab such as "On Run, when build or deployment errors occur:"
Avatar of cenetadmin
cenetadmin

ASKER

it was set to minimal, I even changed it to detailed...I still got build succeeded.
Alright, how about this?

Website > Start Options > Build
Under "Build solution action" is "Build Web site as part of solution" checked?

Also, if you have the little dropdown that allows you to switch between Debug and Release (it's on the "Standard" toolbar) go to the Configuration Manager and select "Build" for the website.
You don't have to add code behind for events, if dont't need it.
The success status after build is right, because you can use events in javascript, on client side, too.
I do have code behind code because I am using it.
Bane83...how do I get to Website > Start Options > build?
Also on the Configuration Manager...I selected it from the dropdown on the my toolbar...
I see Active Solution configuration: my options are:Debug and Release. My current project settings are:
CenetWebSite, Debug, Any CPU,  Build is checked.
Uh... no.  The compiler assumes that anything in the onclick for a button is going to have an event in the codebehind.  Javascript events go into the OnClientClick attribute.
ok, I have used .net before and I am used to having code behind pages. In my old VS 2005 and 2003, I would get errors when I compiled with this type of issue...but now I am not..that is my problem.
Website should be one of the items in the menu up top when you have your website opened.  If you have a solution open with multiple projects, make sure to select the website in the solution explorer first.
You're correct cenet, my above comment was for eridanix.
Bane83 has right, sorry.
ok, Bane83, how do I fix my compiler setting...Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Bane83
Bane83
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial