Server Error in '/' Application.

Attempted to divide by zero.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.DivideByZeroException: Attempted to divide by zero.

Source Error:


Line 331:            int weekClassesTime = hoursPerWeek;
Line 332:
Line 333:            if (courseTotalTime % weekClassesTime > 0)
Line 334:                classWeekLong = courseTotalTime / weekClassesTime + 1;
Line 335:            else

Source File: c:\inetpub\vhosts\programmershouse.ir\httpdocs\SpecialCourses\SpecialCourses.aspx.cs    Line: 333

Stack Trace:


[DivideByZeroException: Attempted to divide by zero.]
   Learning_SpecialCourses_SpecialCourses.GetRegisterCondition(String courseID, String classID) in c:\inetpub\vhosts\programmershouse.ir\httpdocs\SpecialCourses\SpecialCourses.aspx.cs:333
   Learning_SpecialCourses_SpecialCourses.Page_Load(Object sender, EventArgs e) in c:\inetpub\vhosts\programmershouse.ir\httpdocs\SpecialCourses\SpecialCourses.aspx.cs:24
   System.Web.UI.Control.OnLoad(EventArgs e) +107
   System.Web.UI.Control.LoadRecursive() +89
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1601


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9214.0