Wednesday, 26 March 2014

Ballon Popup Extender Sample in ASP.Net/C#

How to display good POPUP Window in ASP.Net using Ajax?
Most of the ASP.Net application requires showing some POPUP window to user for showing some messages or information. Also in order to create a ToolTips in ASP.Net/C# web application it’s very difficult to achieve for good looking ToolTip. In the newest Ajax Control Toolkit includes an awesome good looking and more functional popup extender called Balloon POPUP Extender. It’s a very light weight and having good look and feel popup, also we can apply custom styles for POPUP. Balloon POPUP Extender can use as ToolTips in ASP.Net application.
Download and Register New AjaxControl Toolkit
For implementing Balloon POPUP Extender in ASP.Net/C# application, we need to download newest Ajax Control Toolkit and register to the Project references. You can download new Ajax Control Toolkit from this link. Right click the ‘References’ under the ASP.Net project from Visual Studio and browse the dll and press OK.
In the ASPX page we need to register this ajax toolkit dll like below mentioned code.
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
How to implement Balloon POPUP Extender in ASP.Net/C# Application?
After adding and register the Ajax Control Toolkit as mentioned above, we can start to implement the Balloon POPUP Extender. We can implement Balloon POPUP Extender while clicking/on mouse over/on focus of any server controls in ASP.Net. Below mentioned is the codes for implementing the same.
<ajax:BalloonPopupExtender ID="PopupControlExtender2" runat="server" 
TargetControlID="txtUserName"
 BalloonPopupControlID="pnlBalloon" Position="BottomRight" 
BalloonStyle="Cloud"
 BalloonSize="Medium" UseShadow="true" ScrollBars="Auto" 
DisplayOnMouseOver="true"
 DisplayOnFocus="false" DisplayOnClick="true" />
Balloon Popup Extender Sample
Balloon Popup Extender Sample
Balloon Popup Extender Sample

There are some properties are available for Balloon POPUP Extender control and we can adjust the size,color,style and controls of POPUP using these properties. Below are the main properties of Balloon POPUP Extender
TargetControlID – The ID of the control to attach to.
BalloonPopupControlID – The ID of the control to display.
Position – Optional setting specifying where the popup should be positioned relative to the target control. (TopRight, TopLeft, BottomRight, BottomLeft, Auto) Default value is Auto.
OffsetX/OffsetY – The number of pixels to offset the Popup from its default position, as specified by Position. Default value is 0.
BalloonStyle – Optional setting specifying the theme of balloon popup. (Cloud, Rectangle, Custom). Default value is Rectangle.
BalloonSize – Optional setting specifying the size of balloon popup. (Small, Medium and Large). Default value is Small.
CustomCssUrl – This is required if user choose BalloonStyle to Custom. This specifies the url of custom css which will display custom theme.
CustomClassName – This is required if user choose BalloonStyle to Custom. This specifies the name of the css class for the custom theme.
UseShadow – Optional setting specifying whether to display shadow of balloon popup or not.
ScrollBars – Optional setting specifying whether to display scrollbar if contents are overflowing. This property contains 5 options – None, Horizontal, Vertical, Both and Auto. Default value is Auto.
DisplayOnMouseOver – Optional setting specifying whether to display balloon popup on the client onMouseOver event. Default value is false.
DisplayOnFocus – Optional setting specifying whether to display balloon popup on the client onFocus event. Default value is false.
DisplayOnClick – Optional setting specifying whether to display balloon popup on the client onClick event. Default value is true.
Animations – Generic animations for the PopupControlExtender.
                     OnShow – The OnShow animation will be played each time the popup is displayed. The popup will be positioned correctly               but hidden. The animation can use <HideAction Visible=”true” /> to display the popup along with any other visual effects.
                     OnHide – The OnHide animation will be played each time the popup is hidden.
A very simple example for Balloon POPUP Extender in ASP.Net/C# using Ajax
Here we are demonstrating a very simple for implementing Ajax Balloon POPUP Extender  with full downloadable source code.
ASPX Page
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" 
AutoEventWireup="true"
CodeBehind="Default.aspx.cs" Inherits="BaloonPopup._Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" 
TagPrefix="ajax" %>
<asp:Content ID="HeaderContent" runat="server" 
ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" 
ContentPlaceHolderID="MainContent">
<h2>
Welcome to Baloon Popup Extender Sample
</h2>
<p>
For Website/WebApplication creation <a href="http://www.tuvian.com" 
title="aps.net">www.tuvian.com</a>.
</p>
<div>
<ajax:ToolkitScriptManager ID="Scriptmanager1" runat="server">
</ajax:ToolkitScriptManager>
<div style="border: 1px solid gray; padding: 10px; margin: 10px;">
<h3>
Cloud Style Baloon Popup Example</h3>
<br />
<br />
<ajax:BalloonPopupExtender ID="PopupControlExtender2" runat="server" 
TargetControlID="txtUserName"
BalloonPopupControlID="pnlBalloon" Position="BottomRight" BalloonStyle="Cloud"
BalloonSize="Medium" UseShadow="true" ScrollBars="Auto" DisplayOnMouseOver="true"
DisplayOnFocus="false" DisplayOnClick="true" />
UserName :
<asp:TextBox runat="server" ID="txtUserName" />
<asp:Panel runat="server" ID="pnlBalloon">
This is the Cloud Style Ballon Popup</asp:Panel>
</div>
<div style="border: 1px solid gray; padding: 10px; margin: 10px;">
<h3>
Rectangular Baloon Popup Example</h3>
<br />
<br />
<ajax:BalloonPopupExtender ID="Balloonpopupextender1" runat="server" 
TargetControlID="lblShow"
BalloonPopupControlID="pnlRectangularBallon" Position="TopRight" 
BalloonStyle="Rectangle"
BalloonSize="Medium" UseShadow="true" ScrollBars="Auto" 
DisplayOnMouseOver="false"
DisplayOnFocus="false" DisplayOnClick="true" />
<asp:Label runat="server" ID="lblShow" 
Text="Click Here to Show the Rectangular Balloon Popup" />
<asp:Panel runat="server" ID="pnlRectangularBallon">
This is the rectangular ballon popup</asp:Panel>
</div>
<div style="border: 1px solid gray; padding: 10px; margin: 10px;">
<h3>
Custom Style Baloon Popup Example</h3>
<br />
<br />
<ajax:BalloonPopupExtender ID="Balloonpopupextender2" runat="server" 
TargetControlID="txtCustomBallonPopup"
BalloonPopupControlID="pnlCustomBallon" Position="BottomRight" 
BalloonStyle="Custom"
BalloonSize="Medium" UseShadow="true" ScrollBars="Auto" 
DisplayOnMouseOver="true"
CustomCssUrl="Styles/BalloonPopupOvalStyle.css" 
CustomClassName="oval" DisplayOnFocus="false"
DisplayOnClick="true" />
<asp:TextBox runat="server" ID="txtCustomBallonPopup" />
<asp:Panel runat="server" ID="pnlCustomBallon">
This is the Custom Style ballon popup</asp:Panel>
</div>
</div>
</asp:Content>
--------------

                  DOWNLOAD SOURCE CODE FOR BALLOON POPUP EXTENDER EXAMPLE

Wednesday, 19 March 2014

A Computer Trick For you to Access instant things
















1. Accessibility Controls - access.cpl
2. Accessibility Wizard - accwiz
3. Add Hardware Wizard - hdwwiz.cpl
4. Add/Remove Programs - appwiz.cpl
5. Administrative Tools - control admintools
6. Automatic Updates - wuaucpl.cpl
7. Bluetooth Transfer Wizard - fsquirt
8. Calculator - calc
9. Certificate Manager - certmgr.msc
10. Character Map - charmap
11. Check Disk Utility - chkdsk
12. Clipboard Viewer - clipbrd
13. Command Prompt - cmd
14. Component Services - dcomcnfg
15. Computer Management - compmgmt.msc
16. Control Panel - control
17. Date and Time Properties - timedate.cpl
18. DDE Shares - ddeshare
19. Device Manager - devmgmt.msc
20. Direct X Troubleshooter - dxdiag
21. Disk Cleanup Utility - cleanmgr
22. Disk Defragment - dfrg.msc
23. Disk Management - diskmgmt.msc
24. Disk Partition Manager - diskpart
25. Display Properties - control desktop
26. Display Properties - desk.cpl
27. Dr. Watson System Troubleshooting Utility - drwtsn32
28. Driver Verifier Utility - verifier
29. Event Viewer - eventvwr.msc
30. Files and Settings Transfer Tool - migwiz
31. File Signature Verification Tool - sigverif
32. Findfast - findfast.cpl
33. Firefox - firefox
34. Folders Properties - control folders
35. Fonts - control fonts
36. Fonts Folder - fonts
37. Free Cell Card Game - freecell
38. Game Controllers - joy.cpl
39. Group Policy Editor (for xp professional) - gpedit.msc
40. Hearts Card Game - mshearts
41. Help and Support - helpctr
42. HyperTerminal - hypertrm
43. Iexpress Wizard - iexpress
44. Indexing Service - ciadv.msc
45. Internet Connection Wizard - icwconn1
46. Internet Explorer - iexplore
47. Internet Properties - inetcpl.cpl
48. Keyboard Properties - control keyboard
49. Local Security Settings - secpol.msc
50. Local Users and Groups - lusrmgr.msc
51. Logs You Out Of Windows - logoff
52. Malicious Software Removal Tool - mrt
53. Microsoft Chat - winchat
54. Microsoft Movie Maker - moviemk
55. Microsoft Paint - mspaint
56. Microsoft Syncronization Tool - mobsync
57. Minesweeper Game - winmine
58. Mouse Properties - control mouse
59. Mouse Properties - main.cpl
60. Netmeeting - conf
61. Network Connections - control netconnections
62. Network Connections - ncpa.cpl
63. Network Setup Wizard - netsetup.cpl
64. Notepad - notepad
65. Object Packager - packager
66. ODBC Data Source Administrator - odbccp32.cpl
67. On Screen Keyboard - osk
68. Outlook Express - msimn
69. Paint - pbrush
70. Password Properties - password.cpl
71. Performance Monitor - perfmon.msc
72. Performance Monitor - perfmon
73. Phone and Modem Options - telephon.cpl
74. Phone Dialer - dialer
75. Pinball Game - pinball
76. Power Configuration - powercfg.cpl
77. Printers and Faxes - control printers
78. Printers Folder - printers
79. Regional Settings - intl.cpl
80. Registry Editor - regedit
81. Registry Editor - regedit32
82. Remote Access Phonebook - rasphone
83. Remote Desktop - mstsc
84. Removable Storage - ntmsmgr.msc
85. Removable Storage Operator Requests - ntmsoprq.msc
86. Resultant Set of Policy (for xp professional) - rsop.msc
87. Scanners and Cameras - sticpl.cpl
88. Scheduled Tasks - control schedtasks
89. Security Center - wscui.cpl
90. Services - services.msc
91. Shared Folders - fsmgmt.msc
92. Shuts Down Windows - shutdown
93. Sounds and Audio - mmsys.cpl
94. Spider Solitare Card Game - spider
95. SQL Client Configuration - cliconfg
96. System Configuration Editor - sysedit
97. System Configuration Utility - msconfig
98. System Information - msinfo32
99. System Properties - sysdm.cpl
100. Task Manager - taskmgr
101. TCP Tester - tcptest
102. Telnet Client - telnet
103. User Account Management - nusrmgr.cpl
104. Utility Manager - utilman
105. Windows Address Book - wab
106. Windows Address Book Import Utility - wabmig
107. Windows Explorer - explorer

Tuesday, 4 March 2014

XML document Escape characters

Escapes or unescapes an XML file removing traces of offending characters that could be wrongfully interpreted as markup.
The following characters are reserved in XML and must be replaced with their corresponding XML entities:
  1. ' is replaced with &apos;
  2. " is replaced with &quot;
  3. & is replaced with &amp;
  4. < is replaced with &lt;
  5. > is replaced with &gt;
Original CharacterXML entity replacementXML numeric replacement
<                              &lt;                                    &#60;                                    
>                              &gt;                                   &#62;                                    
"                               &quot;                               &#34;                                    
&                              &amp;                               &#38;                                    
'                               &apos;                               &#39;                                    

Examples:-
DataXml TypeIn XML
He said "OK"AttributeattributeName="He said &quot;OK&quot;"
She said "You're right"AttributeattributeName="She said &quot;You&apos;re right&quot;"
Smith&SonsAttributeattributeName="Smith&amp;Sons"
if (age > 3 && age < 8)Element<MyElement>if (age &gt; 3 &amp;&amp; age &lt; 8)</MyElement>
An XML Comment End with -->Comment<!-- An XML Comment End with --&gt; -->
A & BComment<!-- A &amp; B -->

String escape sequences in Javascripts

PropertiesDescription
\bBackspace.
\fForm feed.
\nNewline.
\ONul character.
\rCarriage return.
\tHorizontal tab.
\vVertical tab.
\'Single quote or apostrophe.
\"Double quote.
\\Backslash.
\dddThe Latin-1 character specified by the three octal digits between 0 and 377. ie, copyright symbol is \251.
\xddThe Latin-1 character specified by the two hexadecimal digits dd between 00 and FF.  ie, copyright symbol is \xA9.
\uddddThe Unicode character specified by the four hexadecimal digits dddd. ie, copyright symbol is \u00A9.

HTML Escape Characters: Complete List

SymbolCodeEntity Name
&#8482; 
 &euro;
Space&#32;&nbsp;
!&#33; 
"&#34;&quot;
#&#35; 
$&#36; 
%&#37; 
&&#38;&amp;
'&#39; 
(&#40; 
)&#41; 
*&#42; 
+&#43; 
,&#44; 
-&#45; 
.&#46; 
/&#47; 
0&#48; 
1&#49; 
2&#50; 
3&#51; 
4&#52; 
5&#53; 
6&#54; 
7&#55; 
8&#56; 
9&#57; 
:&#58; 
;&#59; 
<&#60;&lt;
=&#61; 
>&#62;&gt;
?&#63; 
@&#64; 
A&#65; 
B&#66; 
C&#67; 
D&#68; 
E&#69; 
F&#70; 
G&#71; 
H&#72; 
I&#73; 
J&#74; 
K&#75; 
L&#76; 
M&#77; 
N&#78; 
O&#79; 
P&#80; 
Q&#81; 
R&#82; 
S&#83; 
T&#84; 
U&#85; 
V&#86; 
W&#87; 
X&#88; 
Y&#89; 
Z&#90; 
[&#91; 
\&#92; 
]&#93; 
^&#94; 
_&#95; 
`&#96; 
a&#97; 
b&#98; 
c&#99; 
d&#100; 
e&#101; 
f&#102; 
g&#103; 
h&#104; 
i&#105; 
j&#106; 
k&#107; 
l&#108; 
m&#109; 
n&#110; 
o&#111; 
p&#112; 
q&#113; 
r&#114; 
s&#115; 
t&#116; 
u&#117; 
v&#118; 
w&#119; 
x&#120; 
y&#121; 
z&#122; 
{&#123; 
|&#124; 
}&#125; 
~&#126; 
Non-breaking space&#160;&nbsp;
¡&#161;&iexcl;
¢&#162;&cent;
£&#163;&pound;
¤&#164;&curren;
¥&#165;&yen;
¦&#166;&brvbar;
§&#167;&sect;
¨&#168;&uml;
©&#169;&copy;
ª&#170;&ordf;
«&#171; 
¬&#172;&not;
&#173;&shy;
®&#174;&reg;
¯&#175;&macr;
°&#176;&deg;
±&#177;&plusmn;
²&#178;&sup2;
³&#179;&sup3;
´&#180;&acute;
µ&#181;&micro;
&#182;&para;
·&#183;&middot;
¸&#184;&cedil;
¹&#185;&sup1;
º&#186;&ordm;
»&#187;&raquo;
¼&#188;&frac14;
½&#189;&frac12;
¾&#190;&frac34;
¿&#191;&iquest;
À&#192;&Agrave;
Á&#193;&Aacute;
Â&#194;&Acirc;
Ã&#195;&Atilde;
Ä&#196;&Auml;
Å&#197&Aring;
Æ&#198;&AElig;
Ç&#199;&Ccedil;
È&#200;&Egrave;
É&#201;&Eacute;
Ê&#202;&Ecirc;
Ë&#203;&Euml;
Ì&#204;&Igrave;
Í&#205;&Iacute;
Î&#206;&Icirc;
Ï&#207;&Iuml;
Ð&#208;&ETH;
Ñ&#209;&Ntilde;
Ò&#210;&Ograve;
Ó&#211;&Oacute;
Ô&#212;&Ocirc;
Õ&#213;&Otilde;
Ö&#214;&Ouml;
×&#215;&times;
Ø&#216;&Oslash;
Ù&#217;&Ugrave;
Ú&#218;&Uacute;
Û&#219;&Ucirc;
Ü&#220;&Uuml;
Ý&#221;&Yacute;
Þ&#222;&THORN;
ß&#223;&szlig;
à&#224;&agrave;
á&#225;&aacute;
â&#226;&acirc;
ã&#227;&atilde;
ä&#228;&auml;
å&#229;&aring;
æ&#230;&aelig;
ç&#231;&ccedil;
è&#232;&egrave;
é&#233;&eacute;
ê&#234;&ecirc;
ë&#235;&euml;
ì&#236;&igrave;
í&#237&iacute;
î&#238;&icirc;
ï&#239;&iuml;
ð&#240;&eth;
ñ&#241;&ntilde;
ò&#242;&ograve;
ó&#243;&oacute;
ô&#244;&ocirc;
õ&#245;&otilde;
ö&#246;&ouml;
÷&#247;&divide;
ø&#248;&oslash;
ù&#249;&ugrave;
ú&#250;&uacute;
û&#251;&ucirc;
ü&#252;&uuml;
ý&#253;&yacute;
þ&#254;&thorn;
ÿ&#255; 
Ā&#256; 
ā&#257; 
Ă&#258; 
ă&#259; 
Ą&#260; 
ą&#261; 
Ć&#262; 
ć&#263; 
Ĉ&#264; 
ĉ&#265; 
Ċ&#266; 
ċ&#267; 
Č&#268; 
č&#269; 
Ď&#270; 
ď&#271; 
Đ&#272; 
đ&#273; 
Ē&#274; 
ē&#275; 
Ĕ&#276; 
ĕ&#277 
Ė&#278; 
ė&#279; 
Ę&#280; 
ę&#281; 
Ě&#282; 
ě&#283; 
Ĝ&#284; 
ĝ&#285; 
Ğ&#286; 
ğ&#287; 
Ġ&#288; 
ġ&#289; 
Ģ&#290; 
ģ&#291; 
Ĥ&#292; 
ĥ&#293; 
Ħ&#294; 
ħ&#295; 
Ĩ&#296; 
ĩ&#297; 
Ī&#298; 
ī&#299; 
Ĭ&#300; 
ĭ&#301; 
Į&#302; 
į&#303; 
İ&#304; 
ı&#305; 
IJ&#306; 
ij&#307; 
Ĵ&#308; 
ĵ&#309; 
Ķ&#310; 
ķ&#311; 
ĸ&#312; 
Ĺ&#313; 
ĺ&#314; 
Ļ&#315; 
ļ&#316; 
Ľ&#317 
ľ&#318; 
Ŀ&#319; 
ŀ&#320; 
Ł&#321; 
ł&#322; 
Ń&#323; 
ń&#324; 
Ņ&#325; 
ņ&#326; 
Ň&#327; 
ň&#328; 
ʼn&#329; 
Ŋ&#330; 
ŋ&#331; 
Ō&#332; 
ō&#333; 
Ŏ&#334; 
ŏ&#335; 
Ő&#336; 
ő&#337; 
Œ&#338; 
œ&#339; 
Ŕ&#340; 
ŕ&#341; 
Ŗ&#342; 
ŗ&#343; 
Ř&#344; 
ř&#345; 
Ś&#346; 
ś&#347; 
Ŝ&#348; 
ŝ&#349; 
Ş&#350; 
ş&#351; 
Š&#352; 
š&#353; 
Ţ&#354; 
ţ&#355; 
Ť&#356; 
ť&#357 
Ŧ&#358; 
ŧ&#359; 
Ũ&#360; 
ũ&#361; 
Ū&#362; 
ū&#363; 
Ŭ&#364; 
ŭ&#365; 
Ů&#366; 
ů&#367; 
Ű&#368; 
ű&#369; 
Ų&#370; 
ų&#371; 
Ŵ&#372; 
ŵ&#373; 
Ŷ&#374; 
ŷ&#375; 
Ÿ&#376; 
Ź&#377; 
ź&#378; 
Ż&#379; 
ż&#380; 
Ž&#381; 
ž&#382; 
ſ&#383; 
Ŕ&#340; 
ŕ&#341; 
Ŗ&#342; 
ŗ&#343; 
Ř&#344; 
ř&#345; 
Ś&#346; 
ś&#347; 
Ŝ&#348; 
ŝ&#349; 
Ş&#350; 
ş&#351; 
Š&#352; 
š&#353; 
Ţ&#354; 
ţ&#355; 
Ť&#356; 
ť&#577; 
Ŧ&#358; 
ŧ&#359; 
Ũ&#360; 
ũ&#361; 
Ū&#362; 
ū&#363; 
Ŭ&#364; 
ŭ&#365; 
Ů&#366; 
ů&#367; 
Ű&#368; 
ű&#369; 
Ų&#370; 
ų&#371; 
Ŵ&#372; 
ŵ&#373; 
Ŷ&#374; 
ŷ&#375; 
Ÿ&#376; 
Ź&#377 
ź&#378; 
Ż&#379; 
ż&#380; 
Ž&#381; 
ž&#382; 
ſ&#383;