Click here to Skip to main content
15,892,575 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Can I use ajax toolkit with web user control?
I wrote this code to give a mask to a textbox "TxtPrezzoUnitario" with MaskedEditExtender but does not work
some more help
thanks
Eduardo

XML
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="OpeFatturaDettaglioInsertModify.ascx.vb" Inherits="PrjFattureWeb.OpeFatturaDettaglioInsertModify" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ajaxToolkit" %>

<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></ajaxToolkit:ToolkitScriptManager>
<center>
    <asp:Panel ID="PanelFattura" runat="server">

            
            <table class="table">
                                <tr>
                    <td class="defaultLabel">Prezzo Unitario</td>
                    <td class="td_right">


                        <asp:TextBox ID="TxtPrezzoUnitario" CssClass="input text" runat="server" MaxLength="15"></asp:TextBox>

                        <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender4" runat="server" TargetControlID="TxtPrezzoUnitario" Mask="9999.99" MaskType="Number"
                                DisplayMoney="Left"
                                ErrorTooltipEnabled="True">
                        </ajaxToolkit:MaskedEditExtender>

                    </td>
                </tr>
Posted
Updated 24-Sep-12 21:23pm
v3
Comments
Sandeep Mewara 24-Sep-12 10:26am    
This is not a well framed question! We cannot work out what you are trying to do/ask from the post. Please elaborate and be specific.
Use the "Improve question" link to edit your question and provide better information.

Hi,

If your objective is only to filter a valid character input...

try this if could help:

ASP.NET
<ajaxtoolkit:filteredtextboxextender id="FilteredTextBoxExtender1" runat="server" xmlns:ajaxtoolkit="#unknown">
TargetControlID="TxtPrezzoUnitario" ValidChars="0123456789" FilterMode="ValidChars" />
</ajaxtoolkit:filteredtextboxextender>


Hope this could help.

Regards,
 
Share this answer
 
Comments
edoandria 25-Sep-12 3:22am    
thanks for your solution but i want use MaskedEditExtender because i have a number with two decimal.
thanks anyway
Al Moje 1-Oct-12 20:14pm    
Ypou may add perion in Valid ValidChars and it will works.
e.g.: ValidChars="0123456789."
I recorded AjaxControlToolkit in web.config.
In the master page I put the ToolkitScriptManager
In this configuration the MaskedEditExtender in "web user control" works correctly
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900