Code behind only Imports System.IO Imports System.Web.UI Imports System.Data.Sql Imports System.Data.SqlClient ‘define public classes/share them on page Public ImgUpConf1 As String ‘displays img after success. upload Public ImgUpConf2 As String ‘ ” Public BadImgFormat As String ‘passing banned file ext msg to page Public NoImage As String = “no_image.jpg” ‘default image no image jpg Public […]
Archive for the 'Applications' Category
Add / Substract Date From Current Date
Add 14 days to the current date Current date: Date in 2 weeks: Markup Page Current date: <asp:TextBox ID=”TodayDt” runat=”server” > Date in 2 weeks: <asp:TextBox ID=”DaysAhead” runat=”server” > Code Behind TodayDt.Text = Date.Now.ToShortDateString DaysAhead.Text = Date.Now.AddDays(-Date.Now.DayOfWeek).AddDays(14).ToShortDateString Substract 14 days from current date Current date: Date 2 weeks ago: Markup Page Current date: <asp:TextBox ID=”TodayDt” […]
Count number of characters in textbox
Markup Page <strong>Required Info:</strong> <asp:Label ID=”TotCharReqInfo” runat=”server” ></asp:Label> <strong>Body Length:</strong> <span id=”BodyLength”>0 <strong>Total Length:</strong> <span id=”TotLength”> <asp:Label ID=”TotLengthLbl” runat=”server” ></asp:Label> <strong>Left:</strong> <span id=”CharLeft”> <asp:Label ID=”ChLeft” runat=”server” ></asp:Label> <asp:TextBox id=”txtInputOnln” runat=”server” TextMode=”MultiLine” Width=”300px” Height=”90px” MaxLength=”350″ onKeyUp=”Count(this,350)” onChange=”Count(this,350)”/> Click to read more… <script type=”text/javascript”> var ChLeftVar = “<%=CharLeftInt %>”; var ChLeftOut var ChLefVar2 function count(clientId) { var txtInputOnln = […]