Tuesday, March 4, 2014

How to use Regular Expression Validator for Textbox Control in ASP.NET

The Following example shows, how to use the Regular Expression Validator to validate the Textbox, it allows only numbers(integer values only).

I have a Textbox control called txtAge:

<asp:TextBox ID="txtAge" runat="server"></asp:TextBox>

Here I can use the Regular Expression in 2 methods.

Method 1: (Client Side validation)

<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="txtAge"
ErrorMessage="Enter Valid Age"
EnableClientScript="true"
ValidationExpression="\d+">
</asp:RegularExpressionValidator>

Exp: EnableClientScript="true", represents the client side validation.

Method 2: (Server Side validation)

<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server" ControlToValidate="txtAge"
ErrorMessage="Enter Valid Age"
ValidationGroup="validate"
ValidationExpression="\d+">
</asp:RegularExpressionValidator>

Exp: ValidationGroup="validate", it will validate the textbox when a server side event hits. Like button click.

For that you have to use the button with the same validation group.

<asp:Button ID="btnSubmit" runat="server" Text="Submit" ValidationGroup="validate" />

From the above Regular Expression Validator, we have to mention the validation expression in ValidationExpression. Here I have used the Validation Expression as "\d+" which represents only numbers.

We can mention the Validation Expression as "\d{6}", it represents totally six digits should be entered in Age textbox. It's mainly used for Postal (Zip) code, age validation and etc.

Friday, January 3, 2014

Crystal Report : Group wise total at the Group Header

To show the Group wise total at the group header in Crystal Reports,

Follow the following steps.,
1. Create a Crystal report formula.
2. Use the following expression
sum ({tablename.field_to_summarize}, {tablename.field_you_wanna_grouping_on})
3. Place the created formula in the required group header.

Wednesday, February 22, 2012

Indian rupee format in crystal reports

Method-1:
Step-1 : Create new formula and go-on with editor
Step-2 : Copy the following formula and paste it in the coding part  
                      Cstr({FieldName},"##,##,##,##0.00") or CStr({FieldName}, "##,##,##,###.##") 
 
ie., {FieldName}-- The Amount Field Name

Method-2 :
Step-1 : Create new formula and go-on with editor
Step-2 : Copy the following formula and paste it in the coding part  


                      StringVar Amt;
                      StringVar s;
                      NumberVar N;
                      Amt:=Replace(Totext({FieldName}),",","");
                      s:=left(Amt,len(Amt)-3);
                      N:=len(s);
                      Select N
                      case 4:
                      left(s,1)&","& right(s,3) & ".00"
                      case 5:
                      left(s,2)&","& right(s,3)& ".00"
                      case 6:
                      left(s,1)&","& mid(s,2,2) & "," & right(s,3)& ".00"
                      case 7:
                      left(s,2)&","& mid(s,3,2) & "," & right(s,3)& ".00"
                      case 8:
                      left(s,1)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
                      case 9:
                      left(s,2)&","& mid(s,3,2) & "," & mid(s,6,2) & "," & right(s,3)& ".00"
                     default:
                      s; 

ie., {FieldName}-- The Amount Field Name

Tuesday, August 16, 2011

Windows XP SP3 Media Center 2010 Super MultiBootable v3.6


Bootable Menu :
[1] setup Windows XP SP3 Media Center 2010 with Driver.
[2] Ghost Windows XP SP3 Media Center 2010 with Driver. (pass : trandilinh)
[3] Windows XPE with Kaspersky Anti-Virus 2009 and Some useful Tools to Recovery.
[4] Hiren's Boot CD 9.9.
[5] Setup Boot From Dos for Win.
[6] HDAT2ALL to Repair BadSector for Hdd.
[7] Auto Backup Your Windows to Local Disk D.
[8] Auto Restore Your Windows From Local Disk D.
[9] Mini XP on CD.
[0] Boot From HDD.

What's News in v3.6 ?
01. Update Newest Driver Pack
02. Fix Auto Open My Documents
03. Automatic Install 100%.
04. Update softwarez :
Web browsers:
-Update: Mozilla Firefox 3.5.2 (English), Opera 10.00 Beta 3, Google Chrome 4.0.201.1 Dev.
Graphic:
-Update: MathType 6.5, Unikey 4.0.8 Final, Foxit Reader Pro 3.0 Build 1817, Microsoft office 2003.
Media:
-Update: K-Lite Mega Codec Pack 5.0.5.
Systems:
-Update: Java SE Runtime Environment 6 Update 16, Diskeeper Pro Premier 13.0.835.0, XYplorer 8.20.0000.
Utilities:
-Removed: CPU-Z v1.52, GPU-Z v0.3.4, Attribute Changer 6.10B.
-Update: FileMenu Tools v5.7, CCleaner v2.22.968, Vietnamese Calendar v2.7, WinRAR 3.90 Final.
Recoder:
-Removed: WinImage v8.10.8100.
Internet:
-Update: Yahoo Check v2.1, Internet Download Manager v5.18.

What's News in version 3.5 ? :
- fix Sound for Win.
- Change HDD Icon Disk.
- Update KAV 2009 to 28/07/2009
- Update BKAV Home 2433 to 28/07/2009
- Update c0nficker Removal Tool v0.2: to Remove virus Conficker.
- Update Win32.Sality.OG Removal v0.3, Win32.Sality.OX Removal v0.3, Sality CMC Remover: to Remove Sality virus .
- add Tut : How to make USB Hiren's Boot 9.9
- add Tut : How to make Make Ghost File to backup your PC very Fast.
- add Tut : How to make Make CD AutoGhost.


OS: Windows DLC XP Media Center 2010.

Brower:
Mozilla Firefox 3.5.2 (English)
Google Chrome 4.0.201.1 Dev
Opera 10.00 Beta 3
Internet Explore 8.0.

Internet:
Yahoo! Messenger 10.0.0.331 (16 Langs)
Yahoo! Messenger 9.0.0.2162 (English) (Chat)
Yahoo Check v2.1 (Check Online/Offline Yahoo nick)
Skype 4.1.0.136 (Best voice chat)
Adobe Flash Player 10 ActiveX v10.0.22.87 (Flash plugin for IE)
Adobe Flash Player 10 Plugin v10.0.22.87 (Flash plugin for Firefox)
VietBandwidth v4.1 (Check Internet Bandwidth evey day/month)
MediaFire 7 (Automatic download from mediafire)
Internet Download Manager v5.18 (Best download Tools)

Registry Tweaks:
WinASO Registry Optimizer v4.2 (Fix Registry )

Graphic:
All Fonts (complate)
UniKey 4.0.8 Final (Keyboard tools)
Lingoes Translator v2.6.1 (Dictionary)
Adobe Photoshop CS4 (Best Photo Editor)
Microsoft Office 2003
Microsoft Office 2007
Classic Menu for Office 2007 v4.01 (add menu ofOffice 2003 for office 2007)
MathType 6.5
Foxit PDF Editor v2.1.0 Build 0119 (Editor PDF)
Foxit Reader Pro 3.0 Build 1817 (Reader PDF)

Media:
Windows Media Player 11.0.5721.5145
DFX 9.107 for Windows Media Player (Plugin for WMP)
K-Lite Mega Codec Pack 5.0.5 (Support All media type)
JetAudio Plus VX 7.5.3.15 (Small and Pro Media tools)
Windows Media Center 2010 (For MCE)
ImTOO MPEG Encoder Ultimate 5.1.20.0121 (Convert Audio Music)
Total Video Converter 3.21 (Convert Video)

Systems:
Microsoft .NET Framework 4 Beta 1
Java SE Runtime Environment 6 Update 16
Diskeeper Pro Premier 13.0.835.0 (Defragment HDD)
Your Uninstaller! 2008 Pro 6.2.1347
PC Security 6.4
Shutdown Lock v1.5
USB Safely Remove v4.1.5.800 Final
Shutter 3.0 (H?n gi? t?t m�y)
Driver Genius Professional Edition v9.0.0.180 (Backup and Restore Driver)
DriverMax v5.0 ((Backup and Restore Driver)
Total Commander v7.5 Beta 7 (good Manager your file)
XYplorer 8.20.0000 (Cool Manager your file)

Utilities:
Hiren's Boot CD v9.9 on HDD (Do you want to use Hiren boot with Windows)
HDAT2ALL (ADD boot menu HDAT2ALL ON HDD)
Auto Backup Ghost and Auto Restore Ghost (auto ghost to backup)
Ghost 11.5 (ADD boot menu Ghost 11.5 ON HDD)
WinRAR 3.90 Beta 5 Full
TuneUp Utilities 2009 v8.0.3300.1 (Optimizer your system and Manage your style)
WinTools.net Professional 10.0.1 (clean & clear Registry and Windows)
CCleaner v2.21.940 (Clean Hdd,regedit, IE Cookie)
UnLocker v1.8.7 (Del, move, copy files which you can not)
Tweak UI 2.10.0.0 (Edit your system)
Casio Vn-570MS (Vitual Calculator)
R-Studio 4.6 Build 128038 (Do You want to recovery Deleted Files ?)
HWiNFO32 v3.01-332 Beta released (View Your HardWare Infomation with Details)
HashTab 2.3.0 (Check File Hashes)
File Splitter & Joiner v3.3 (Join .001,.002,_a,_b file)
Vietnamese Calendar v2.7 (Calendar Desktop)

Recoder:
Nero Lite 9.0.9.4b
Ashampoo Burning Studio v9.05
UltraISO Edition Premium v9.3.3.2685 (Best Iso Editor)

Media Center 2010:
Vista Sound Pack, XWindowsDock, Windows Sidebar & Gadgets, Vista Aero Cursors, Styler ToolBar 2010, Driver Icon, ViSplore, UberIcon, 31 themes vip, Green Icon System.

For Windows 1 (KB954430 KB923561 KB938464 KB941569 KB946648 KB950974 KB951376 KB951748 KB952004 KB952954)
For Windows 2 (KB953155 KB954459 KB954600 KB955069 KB956802 KB956803 KB957097 KB958644 KB958687 KB958690)
For Windows 3 (KB959426 KB960225 KB960803 KB961373)
For Windows Media Player 11 (KB936782 KB939683 KB954154 KB959772)
Other (KB955839 KB961118)

DLC Super Multi Boot 3.6
File name: DLC 3.6.iso
File size: 4.2GB
CRC32: 280ACCA9
MD5: 9C5D171A592B25C230F5F8D164B1BC99
SHA-1: E18BB0BCAB51407D118753543F0B5749A1A8B146

Download Link:







 

http://extratorrent.com/download/2157811/Windows+XP+SP3+Media+Center+2010+Super+MultiBootable+v3.6++-+September+2009.torrent

Saturday, August 13, 2011

ASP.NET--Custom Validation Expression's

Some of the expression's that are used for validating the fields in the web form in ASP.NET

For Name:
^[a-zA-Z\s,.]{1-50}$

For Mobile Number:

^[7-9]{1}[0-9]{9}$

For Land-line Number:
^[0-9,\s,-]{10,13}$

For Car Registration Number:
^[a-zA-Z]{2}[0-9]{2}[a-zA-Z]{1,2}[0-9]{1,4}$

For E.mail:(Regular Expression)
\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*

For Website:
^((h|H?)(t|T?)(t|T?)(p|P?)(s|S?)\://)?(www.|[a-zA-Z0-9].)[a-zA-Z0-9\-\]+\.[a-zA-z]*$

Explanation:

^ and $                  -     For represents the Custom validation

a-z and A-Z            -     Letters from alphabets both upper and lower

0-9                        -     Numbers 0,1,2,3,4,5,6,7,8,9

\s (or) \S                -     Space between strings

{1,30} (or) {1,50}    -     Range or Count of the values. ex.  {min,max}

?                           -     For optional