vijay

welcome Netizen

Share Your Knowledge.It is a way to achieve immortality

Monday, November 28, 2011

Ajax Control Toolkit BalloonPopupExtender


HI..
In this article we going to see about latest release of Ajax control.. Ajax Control Toolkit November 2011 Release added some new control . This release introduces a new Balloon Popup control, support for vertical tabs, and support for keyboard tab navigation.
Now we have see about balloon popup extender control..
First you have to download new AJAX Control Toolkit is November 2011 from the below URL.
After you install Ajax toolkit control and add the ballon popup extender to your project ..For your reference go through the below mention code…

<div>
        <br />
        <br />
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
       Enter Your password: <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Label ID="lblruls" runat="server" Text="Password Rules click Here"></asp:Label>
    <div>
           <asp:Panel ID="Pan1" runat="server">
       Enter Your Password
           </asp:Panel>
            <asp:Panel ID="Panel1" runat="server" class="bgcolor">
            Password contains minimum six digit Number
            </asp:Panel>
       </div>
        <asp:BalloonPopupExtender ID="BalloonPopupExtender1" runat="server" UseShadow ="true"  TargetControlID ="textbox1" BalloonPopupControlID ="pan1" CustomClassName="oval"  CustomCssUrl ="bgcolor" BalloonStyle ="Cloud" BalloonSize ="Small">
        </asp:BalloonPopupExtender>
Here’s how you display the Balloon Popup when you hover over the link
        <asp:BalloonPopupExtender ID="BalloonPopupExtender2" runat="server" UseShadow ="true"  TargetControlID ="lblruls" BalloonPopupControlID ="panel1" CustomClassName="oval" DisplayOnMouseOver ="true"  CustomCssUrl="bgimage">
        </asp:BalloonPopupExtender>
    </div>

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. See the Using Animations walkthrough and Animation Reference for more details.
·         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.
 I hope this one will be useful to all………..




Tuesday, November 15, 2011

Get a free website from google

Google
Hi…
This buzz will give more excited for many people…because any one now can create own website at a free of cost….this offer was given by google..If your doing any small business ..then don’t  waste the time sign up get your own identity to start own website for your business….
By creating own domain it give grow up your business  and compete with big company…
For this you have to click the below link..and sign in using gmail and start your website….

Solution:invalid formatetc structure


Hi.
.Recently I worked with my one latest project ..In this one I opened to source files I worked on it…when I was busy In coding I opened at a time two file..I copied one source code and paste it another one..including ajax control..
Suddenly what happen when I drag one new ajax control from menu  its shows an error like invalid formatetc structure.
I opened and closed the project against it shows an same error.i cann’t any new ajax control in my project.
Solution:

Finally I removed all the ajax control  then I added again all the ajax control using dll file..Then its work fine…..

Monday, November 14, 2011

Using Ajax Multihandleslider extender with css


Hi..
In previous article I explained about how to use slider extender with CSS..For your refrence I below mention the link..


Now in this article we have seen about ..How to use multihandleslider extender with css..its very intresting and easy to use multihandle extender..Its mainly used to select a between particlular range..

Properties:

Minimum - Minimum value allowed.
Maximum - Maximum value allowed.
Steps - Number of discrete values inside the slider's range.
ShowHandleHoverStyle - Whether to display an alternate CSS style when the user is hovering over a handle.
ShowHandleDragStyle - Whether to display an alternate CSS style when the user is dragging a handle.
MultiHandleSliderTargets - An inner property describing each handle on the slider.
·         ControlID - The TextBox or Label whose value is bound to this handle.
·         HandleCssClass - For sliders with custom styling; the CSS class used to style the handle.
·         HandleHoverCssClass - For sliders with custom styling and hover effects; the CSS class used when the user is hovering over the handle.
·         HandleDragCssClass - For sliders with custom styling and drag effects; the CSS class used when the user is dragging the handle.
·         DecimalPlaces - The number of decimal places to format the bound control's value.
·         Offset - For sliders with custom styling and inner rails; sets the pixel offset where the inner rail begins, for handles that use transparency.

Use the below images for applying css..Copy the below images and create one folder name of images and paste it



Intially apply the css for multihandle extender…..

<style type="text/css">
.ajax__multi_slider_custom .handle-x-left
        {
            position: absolute;
            background: url('images/point.png') no-repeat;
            width: 15px;
            height: 25px;
            z-index: 200;
            cursor: w-resize;
        }
        .ajax__multi_slider_custom .handle-x-right
        {
            position: absolute;
            background: url('images/point.png') no-repeat;
            width: 15px;
            height: 22px;
            z-index: 200;
            cursor: w-resize;
        }
        .ajax__multi_slider_custom
        {
            position: relative;
            background: url('images/r.gif') repeat-x;
            width: 170px;
            height: 25px;
            z-index: 100;
        }
    </style>

Drag the multihandle slider extender from ajaxcontrol tool kit….apply CSS should be like this…

<div>
        <cc1:MacroWebTextBox ID="txtfrom" runat="server" Width="70" Text="0"></cc1:MacroWebTextBox>
        <cc1:MacroWebTextBox ID="txtto" runat="server" Width="70" Text="2000000"></cc1:MacroWebTextBox>
        <asp:MultiHandleSliderExtender ID="MultiHandleSliderExtender1" runat="server" BehaviorID="multiHandleSliderExtenderTwo"
            ShowInnerRail="true" HandleAnimationDuration="0.1" TooltipText="{0}" TargetControlID="slider"
            CssClass="ajax__multi_slider_custom" RaiseChangeOnlyOnMouseUp="true" Minimum="0"
            Maximum="2000000">
            <MultiHandleSliderTargets>
                <asp:MultiHandleSliderTarget ControlID="txtfrom" HandleCssClass="handle-x-left" />
                <asp:MultiHandleSliderTarget ControlID="txtto" HandleCssClass="handle-x-right" />
            </MultiHandleSliderTargets>
        </asp:MultiHandleSliderExtender>
        <cc1:MacroWebTextBox ID="slider" runat="server"></cc1:MacroWebTextBox>
    </div>

I hope this one will be useful to all…..


Wednesday, November 2, 2011

Regular Expression for separate a string


HI..Here I have to share an regular expression usage for split text from string…..Normally we can split a string some character .In some cases we have mix with number of characters…For that situation we can use regex expression to separate a string….
Here some example…
(test1) “"test2"” ANY(test) AND(test) (raj:test5 AND Test=test6) &animaltiger&
For this word we want to separate as each word we use reular expression
(test1)
“"test2"”
 ANY(test)
AND(test)
(raj:test5 AND Test=test6)
&animaltiger&
By using regex we can separate like above….
The Code as follows…….
VB CODE
Dim result As New List(Of String)
        Dim str As String
        str = "(test1) ""test2"" ANY(test) AND(test) (raj:test5 AND Test=test6) &animaltiger&"
        Dim t As MatchCollection = Regex.Matches(str, "[""].+?[""]|[^\s]*?[(].+?[)]|[&].+?[&]")
        For Each itm As Match In t
            result.Add(itm.Value)
        Next
C# code
  List<string> result = new List<string>();
            string s = @"(test1) ""test2"" ANY(test) AND(test) (raj:test5 AND Test=test6) &animaltiger&";
           
            MatchCollection t = Regex.Matches(s, @"[""].+?[""]|[^\s]*?[(].+?[)]");
           
            foreach (Match  itm in t)
            {
                result.Add(itm.Value);
            }
I hope this one helpful to all