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

  • SEARCH
  • Home
  • 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 8982127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:30:32+00:00 2026-06-15T20:30:32+00:00

I have looked through examples on using JQuery in asp.net user controls and when

  • 0

I have looked through examples on using JQuery in asp.net user controls and when I try the examples as expressed in forums I still don’t get any response from the JQuery.
Can anyone help me with this please? The entire control markup is seen below.
Just in case it is not obvious, I want to implement a filter of the characters accepted into the txtNoteText textbox.

    <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NotesEdit.ascx.cs" Inherits="InstallationProjectManager.Restricted.NotesEdit" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI, Version=2011.2.915.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" %>
<script src="<%# ResolveUrl("~/javascript/jquery-1.8.3.min.js") %>" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function() {
        $('<%= txtNoteText.ClientID %>').bind('keypress', function(event) {
            var regex = new RegExp("^[a-zA-Z0-9]+$");
            var key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
            if (!regex.test(key)) {
                event.preventDefault();
                return false;
            }
        });
    });
</script>
<table id="tblNotesEdit" style="border-collapse: collapse; border-spacing: 2px; border: 15px; padding: 1px; width: 100%;">
    <tr>
        <td>
            <table style="margin-left: 10px; width: 100%;">
                <tr><td><asp:HiddenField runat="server" ID="hfNoteID" Value='<%# DataBinder.Eval(Container, "DataItem.ID") %>'/></td></tr>
                <tr><td colspan="2"><h2 class="headerMajor">Add/Edit Job Notes</h2></td></tr>
                <tr>
                    <td class="verticleTableStyle">Note Type:</td>
                    <td>
                        <telerik:RadComboBox ID="cbxNoteType" Runat="server" Enabled='<%# (DataItem is GridInsertionObject) %>' SelectedValue='<%# DataBinder.Eval(Container, "DataItem.NoteTypeID") %>' DataSourceID="dsNoteTypes" DataTextField="Description" DataValueField="ID" Skin="Simple" />
                        <asp:SqlDataSource ID="dsNoteTypes" runat="server" ConnectionString="<%$ ConnectionStrings:InstallationProjectManager.Properties.Settings.conDB %>" SelectCommand="SELECT [ID], [Description] FROM [NoteTypeEnumeration]"></asp:SqlDataSource>
                        <asp:RequiredFieldValidator runat="server" ID="rfvCBXNoteType" EnableClientScript="True" ControlToValidate="cbxNoteType" ErrorMessage="Note type is required to create a note record." InitialValue="Pick One" Display="None" />
                        <ajaxToolkit:ValidatorCalloutExtender ID="vceRFVCBXNoteType" runat="server" TargetControlID="rfvCBXNoteType"/>
                    </td>
                </tr>

                <tr><td class="verticleTableStyle">Note Text:</td><td><telerik:RadTextBox ID="txtNoteText" runat="server" SkinID="LongTextBox" Culture="en-US" Text='<%# DataBinder.Eval(Container, "DataItem.Message") %>' EmptyMessage="Notes" Skin="Simple" Rows="20" Width="90%" Height="50%" TextMode="MultiLine" /></td></tr>
                <tr><td></td></tr>
                <tr><td></td></tr>
                <tr>
                    <td colspan="2">
                        <telerik:RadButton ID="btnUpdate" Text="Update" runat="server" Skin="Telerik" CommandName="Update" Visible='<%# !(DataItem is GridInsertionObject) %>'><Icon PrimaryIconUrl="../Images/saveHS.png" /></telerik:RadButton>
                        <telerik:RadButton ID="btnInsert" Text="Insert" runat="server" Skin="Telerik" CommandName="PerformInsert" Visible='<%# DataItem is GridInsertionObject %>'><Icon PrimaryIconUrl="../Images/saveHS.png" /></telerik:RadButton>
                        &nbsp;
                        <telerik:RadButton ID="btnCancel" Text="Cancel" runat="server" Skin="Telerik" CommandName="Cancel" CausesValidation="False"><Icon PrimaryIconUrl="../Images/305_Close_16x16_72.png" /></telerik:RadButton>
                    </td>
                </tr>
                <tr><td></td></tr>
                <tr><td></td></tr>
                <tr><td></td></tr>
            </table>            
        </td>
    </tr>
</table>

Thanks.

  • 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-06-15T20:30:33+00:00Added an answer on June 15, 2026 at 8:30 pm

    You need to prefix DOM element id with # in jquery selector:

    $('#<%= txtNoteText.ClientID %>').bind(...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I have looked through source of Castle Active Record project (in .net) in
I'm still relatively new to Rails and have looked through many similar questions here,
I have looked through the solutions on stackoverflow and none of them seem to
I have looked through the solutions and haven't really found one. I am getting
I have looked through several sites for any useful documentation and have come up
I seem to have looked through many solution on here and the web and
I've downloaded the Windows Media Center SDK and have looked through the documentation, but
Ok.. I have looked through this site and just can't seem to find the
Composer is a PHP package manager. I have looked through the documentation here: http://getcomposer.org/
OK, I have been looking for weeks now. I have looked through Eclipse and

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.