Home » Posts tagged "ASP.NET" (Page 10)

Archive for the 'ASP.NET' Tag

Maximum request length exceeded

Having issues uploading files? Getting message like “maximum request length exceeded?” The solution to this is simple; add the following code to your configuration file: <configuration> <system.web> <httpRuntime maxRequestLength=”35000″ /> </system.web> </configuration> * set the maxRequestLength to whatever your need might be.

Arithmetic overflow error converting expression to data type datetime

Condition: <asp:SqlDataSource ID=”PolExpCurrentMo” runat=”server” ConnectionString=”< %$ ConnectionStrings:appConnectionString2 %>” SelectCommand=”SELECT * FROM [VendorList] WHERE _([EXPIRATION_DATE] >= @EXP_BEGIN) AND ([EXPIRATION_DATE] < @EXP_END) AND _([EXPIRATION_CONTACT] = @EXPIRATION_CONTACT) ORDER BY EXPIRATION_DATE "> <selectparameters> <asp:parameter DefaultValue=”YES” Name=”EXPIRATION_CONTACT” Type=”String” /> <asp:parameter Name=”EXP_BEGIN” Type=”String”/> <asp:parameter Name=”EXP_END” Type=”String” /> </selectparameters> Code behind default value ‘ *current months date parameter PolExpCurrentMo.SelectParameters(“EXP_BEGIN”).DefaultValue = _DateTime.Now.Month.ToString() + […]

Month, day and year code behind format

Day name and date format of Friday, 11/11/2011 Dim strDayName As String Dim curTime As New DateTime curTime = DateTime.Now.ToShortDateString() strDayName = curTime.DayOfWeek.ToString Response.Write(strDayName & “, ” & DateTime.Today) Result: Friday, 11/11/2011 Day name and date format of Friday, 11/11/2011 using case funtion Dim iDay As String Dim strDayName As String iDay = DatePart(“w”, DateTime.Now) […]