Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6729171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T10:15:27+00:00 2026-05-26T10:15:27+00:00

I have install and setup the Asp.net version of AjaxControlToolkit. version 4.1.5 .Net 4.0

  • 0

I have install and setup the Asp.net version of AjaxControlToolkit.

version 4.1.5

.Net 4.0

VS 2010

I’m trying to uses the AjaxControlToolkit.MaskedEditExtender Ajax control.
I have setup up a DetailView and some custom Templates that will allow me access to the TextBoxs.

But keep getting this error :

>     Object reference not set to an instance of an object.
>     Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more
> information about the error and where it originated in the code.
>     
>     Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
>     
>     Source Error:
>     
>         An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location
> of the exception can be identified using the exception stack trace
> below.
>         
>         Stack Trace:
>         
>         [NullReferenceException: Object reference not set to an instance of an object.]
>            AjaxControlToolkit.MaskedEditExtender.OnLoad(EventArgs e) in
> C:\Users\Stephen\Documents\Repos\Superexpert\AjaxControlToolkit\Server\AjaxControlToolkit\MaskedEdit\MaskedEditExtender.cs:95
>            System.Web.UI.Control.LoadRecursive() +74
>            System.Web.UI.Control.LoadRecursive() +146
>            System.Web.UI.Control.LoadRecursive() +146
>            System.Web.UI.Control.LoadRecursive() +146
>            System.Web.UI.Control.LoadRecursive() +146
>            System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
> +2207

Here is my code for that section(HTML page .ASPX)

<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="New.aspx.cs" Inherits="AequorPubTracker.Account.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    &nbsp;Search:
    <asp:TextBox ID="SearchTextBox" runat="server"></asp:TextBox>
&nbsp;
    <asp:Button ID="Button1" runat="server" Text="Search" />
    <asp:DetailsView ID="DetailsView1" runat="server" AllowPaging="True" 
        AutoGenerateRows="False" DataKeyNames="Id" DataSourceID="LinqDataSource1" 
        Height="50px" onpageindexchanging="DetailsView1_PageIndexChanging" 
        style="margin-top: 20px" Width="472px">
        <Fields>
            <asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False" 
                ReadOnly="True" SortExpression="Id" />
            <asp:TemplateField>
                <EditItemTemplate>
                    <asp:TextBox ID="TextBox1" runat="server" Text='<%# BIND("PubId") %>'></asp:TextBox>

                </EditItemTemplate>
                <InsertItemTemplate>
                    <asp:TextBox ID="TextBox2" runat="server" Text='<%# BIND("PubID") %>'></asp:TextBox>
                </InsertItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label2" runat="server" Text='<%# Eval("PubId") %>'></asp:Label>
                    <br />
                    <asp:Label ID="Label3" runat="server" Text='<%# Eval("Sent_from_naylor") %>'></asp:Label>
                    <br />
                    <asp:Label ID="Label4" runat="server" Text='<%# Eval("RecByAequorMgt") %>'></asp:Label>
                    <br />
                    <asp:Label ID="Label5" runat="server" Text='<%# Eval("AssignedToAequorRes") %>'></asp:Label>
                    <br />
                    <asp:Label ID="Label6" runat="server" Text='<%# Eval("SentTonaylor") %>'></asp:Label>
                    <br />
                    <asp:Label ID="Label7" runat="server" Text='<%# Eval("Status") %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:CommandField ShowEditButton="True" ShowInsertButton="True" />
        </Fields>
    </asp:DetailsView>

   <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender1" runat="server"  
     TargetControlID="TextBox1"   
     Mask="999,9999"  
     MessageValidatorTip="true"   
     OnFocusCssClass="MaskedEditFocus"   
     OnInvalidCssClass="MaskedEditError"  
     MaskType="Number"   
     InputDirection="RightToLeft"   
     AcceptNegative="Left"   
     DisplayMoney="Left"  
     ErrorTooltipEnabled="True"/>


   <ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server"  
     TargetControlID="TextBox2"   
     Mask="999,9999"  
     MessageValidatorTip="true"   
     OnFocusCssClass="MaskedEditFocus"   
     OnInvalidCssClass="MaskedEditError"  
     MaskType="Number"   
     InputDirection="RightToLeft"   
     AcceptNegative="Left"   
     DisplayMoney="Left"  
     ErrorTooltipEnabled="True"/>

    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        ContextTypeName="AequorPubTracker.AequorDataDataContext" EnableDelete="True" 
        EnableInsert="True" EnableUpdate="True" EntityTypeName="" 
        TableName="Aequor_Pub_Trackers">
    </asp:LinqDataSource>

    <asp:QueryExtender ID="QueryExtender1" runat="server" TargetControlID="LinqDataSource1">

    <asp:SearchExpression SearchType="StartsWith" DataFields="PubId">
      <asp:ControlParameter ControlID="SearchTextBox" />
     </asp:SearchExpression>

    </asp:QueryExtender>
&nbsp;

</asp:Content>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T10:15:27+00:00Added an answer on May 26, 2026 at 10:15 am

    You’re receiving this error becase the target control is nested in a databound control, and the extender is unable to find the target control. Try putting the MaskedEditExtender in the DetailsView control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built a web setup project in VS2008 which installs my ASP.NET/Silverlight app
I have go TCPDF setup in my cake php install and am now trying
I want install Android version 1.6 SDK. I already have Android development setup with
Given the following setup, I have three assemblies. Web (ASP.NET MVC 3.0 RC1) Models
I am trying to install my application onto IIS 6. It's asp.net 4 mvc
I have a simple inno-setup script that allows my setup to install either the
I have a setup executable that I need to install. When I run it,
I have a Visual Studio Setup Project that I use to install a fairly
I have development server setup running Adobe Coldfusion8 (.war install) on top of Caucho
I hate to sound stupid, but ASP.NET is not my forte. I have build

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.