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 7560707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T12:58:21+00:00 2026-05-30T12:58:21+00:00

i am beginner for asp.net . I now facing a problem . How can

  • 0

i am beginner for asp.net . I now facing a problem . How can i force a user to select option from ajax control toolkit autocomplete?
Here is my sample code

<cus:cusTextBox ID="txtCMemberID" runat="server" Action="Edit"
    CssClass="inputTextM" OnTextChanged="txtCMemberID_TextChanged"
    AutoPostBack="True"></cus:cusTextBox>
<asp:AutoCompleteExtender ID="AutoCompleteExtender2" runat="server"
    ServicePath="~/Module/Common/autoComplete/acLewreMember.asmx"
    MinimumPrefixLength="1" ServiceMethod="GetSuggestedStrings"
    TargetControlID="txtCMemberID" CompletionInterval="10"
    CompletionSetCount="3" EnableCaching="true"
    CompletionListCssClass="completionListElement"
    CompletionListItemCssClass="listItem"
    CompletionListHighlightedItemCssClass="highlightedListItem"
    FirstRowSelected="True"
    ShowOnlyCurrentWordInCompletionListItem="True">
</asp:AutoCompleteExtender>

As you see the textbox is a custom control. Is that any way to force user to select option from autocomplete?Please provide me a sample code also. 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-05-30T12:58:22+00:00Added an answer on May 30, 2026 at 12:58 pm

    ASP.NET includes a useful feature called a validator.

    <asp:TextBox ID="TextBox2" ValidationGroup="Group2" runat="server" />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" ErrorMessage="*Required" ValidationGroup="Group2"
    ControlToValidate="TextBox2" runat="server" />
    <asp:Button ID="Button2" Text="Validate Group2"
    ValidationGroup="Group2" runat="server" />
    

    Here is the resource link for msdn: http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.requiredfieldvalidator.aspx

    I’m not sure how these work with custom controls as I’m relatively new at asp. They also have a custom validator which might be more suited for your purposes, but like I said. I don’t know exactly.

    Note: If the client is using an old browser this won’t work, so you also want to check on the server that this field isn’t empty by using:

    if (Page.IsValid)
    {
         //stuff to do in your event handler
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question from beginner. Why code <%= System.DateTime.Now.ToLongDateString() %> is not executed in ASP.NET. Could
I am an absolute beginner at ASP.NET. How can I learn it better? Currently
Im new to php..I had used GridView control in asp.net for Listing records. Now
another beginner problem. Why isn't the following code with an asp.net page not working?
I'm beginner in Asp.Net and Im trying to display gc on reapet control. Here's
I am a beginner in ASP.Net. I am starting a new project using ASP.Net
I am just a beginner in ASP.NET. My question is simple, I wanna add
This is a beginner level question for asp.net MVC I have the following code
Probably a very basic beginner question. Imagine the following situation: I have an ASP.NET
I am a beginner coder, i am building a project using C# Asp.Net in

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.