function ValidateDate(CtrlSDate,CtrlEDate) { var SDate = document.getElementById(CtrlSDate).value; var EDate = document.getElementById(CtrlEDate).value; var alertReason1 = 'End Date must be greater than or equal to Start Date.' var alertReason2 = 'End Date can not be less than Current Date.'; var endDate = new Date(EDate); var startDate= new Date(SDate); if(SDate != '' && EDate != '' && startDate > endDate) { alert(alertReason1); document.getElementById(CtrlEDate).value = ""; return false; } else if(SDate == '') { alert("Please enter Start Date"); return false; } else if(EDate == '') { alert("Please enter End Date"); return false; } }
Thursday, 12 April 2012
Start Date Greater Than End Date Validation in Jquery
How to Blinking the Text in Windows Form Applications
1. Open the Visual Studio 2010-->File -->New-->Project-->Select Windows Form
Application -->ClickOK
2. From the Tool Box Take one Label And one Timer
Control.
3. Change the Timer and Label Names.
4. Then Write the Below Code in Form1.CS File
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication4
{
public partial class Form1 : Form
{
private const int _blinkFrequency = 250;
private const int _maxNumberOfBlinks = 1000;
private int
_blinkCount = 0;
public Form1()
{
InitializeComponent();
timer1.Interval = _blinkFrequency; //optional:
set in design code
label1.Text = "Welcome";
timer1.Start();
}
private void timer1_Tick(object sender, EventArgs
e)
{
this.label1.Visible = !this.label1.Visible;
_blinkCount++;
if (_blinkCount == _maxNumberOfBlinks * 2)
{
timer1.Stop();
label1.Visible = true;
}
}
}
}
5. After The Writing Code We Can Get output like This
Below:
How to Use Marquee in WIndows Form Applications
1. Open the Visual Studio 2010-->File -->New-->Project-->Select Windows Form
Application -->ClickOK
2. From the Tool Box Take one Label And one Timer
Control.
3. Change the Timer and Label Names
4. Then Write the Below Code in Form1.CS File.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication5
{
public partial class Form1 : Form
{
private int xPos = 0,
YPos = 0;
public Form1()
{
InitializeComponent();
}
private void
timer1_Tick(object sender, EventArgs e)
{
if (xPos == 0)
{
this.lblText.Location = new System.Drawing.Point(this.Width, YPos);
xPos = this.Width;
}
else
{
this.lblText.Location = new System.Drawing.Point(xPos,
YPos);
xPos -= 2;
}
}
private void
Form1_Load(object sender, EventArgs e)
{
lblText.Text = "Hello this is marquee
text";
xPos = lblText.Location.X;
YPos = lblText.Location.Y;
timer1.Start();
}
}
}
5. After The Writing Code We Can Get output like This
Below:
Subscribe to:
Posts (Atom)