Skip to main content

Posts

Showing posts from October, 2012

Simple Cursor Example in SQL

    DECLARE @Pram int     DECLARE aCursor CURSOR     FOR         SELECT             *                     FROM             TableName                 OPEN aCursor                     FETCH NEXT FROM aCursor INTO         @Pram             WHILE @@FETCH_STATUS = 0         BEGIN             --'what you want to do hear'             FETCH NEXT FROM aCursor INTO                 @Pram         END     CLOSE aCursor     DEALLOCATE aCursor

Date Picker control for ASP.net using Dropdown control of DD,MM,YYYY

Date Picker control for ASP.net using Dropdown control of DD,MM,YYYY .aspx File <asp:DropDownList ID="ddlDay" Width="60px" runat="server"> </asp:DropDownList> <asp:DropDownList ID="ddlMonth" Width="120px" runat="server"> </asp:DropDownList> <asp:DropDownList ID="ddlYear" Width="80px" runat="server"> </asp:DropDownList> &nbsp; <%--<asp:Image ID="imgCalendar" runat="server" ImageUrl="~/Images/calendar.gif"     EnableViewState="False"></asp:Image>--%> <asp:Label ID="lblError" runat="server" CssClass="error" Visible="False" EnableViewState="False"><BR />The date is not valid.</asp:Label> .cs File public partial class DateTimePicker : System.Web.UI.UserControl { // Fields private DateTime _dateTime; private int