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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:06:38+00:00 2026-05-25T01:06:38+00:00

I have a webform which dynamically loads a web user control in it. Within

  • 0

I have a webform which dynamically loads a web user control in it. Within the web user control is a repeater control and within the repeater control I have an ajaxtoolkit rating control for each repeating item, and the web user control can be dynamically created within it self as many times as needed. To handle the selected rating I have to use BehaviorID along with the following code:

<script type="text/javascript">
    function pageLoad() { $find("ratingControlBehavior").add_EndClientCallback(onClientCallBack); }
    function onClientCallBack(sender, eventArgs) {
        var htmlname = sender._callbackID.substring(0, sender._callbackID.lastIndexOf('$')) + '_hdrating';
        htmlname = htmlname.replace(/\$/g, '_')
        var hdctl = document.getElementById(htmlname);
        hdctl.value = eventArgs.get_CallbackResult(); 
    }
</script>

the issue is, when more than one rating control is on the form at once, only the first rating control works, the other ratings are disabled. If I take out the BehaviorID then all works fine.

My question is, how would I code for multiple BehaviorID’s as well as the script for each, since I need these items for each rating control?

  • 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-25T01:06:39+00:00Added an answer on May 25, 2026 at 1:06 am

    This was accomplished by doing the following:

        String scriptText = "";
        scriptText += "function pageLoad(){";
        foreach ( group.category.point item in tpnts )
        { scriptText += "     $find('ratingControlBehavior" + item.eval_id + "').add_EndClientCallback(onClientCallBack);"; }
        scriptText += "}";
        ClientScriptManager csm = ClientScript;
        csm.RegisterStartupScript(this.GetType(), "scriptonload", scriptText, true);
    

    and within the repeating_ItemDataBound

            rating.BehaviorID = "ratingControlBehavior" + pnt.eval_id.ToString();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a webform which dynamically loads a web user control in it. Within
I have an ASP.NET web form which I am adding a variable number User
I have a webform that allows users to dynamically add 'sections' (which are divs
I have an asp.net url path which is being generated in a web form,
I have a .NET webform that has a file upload control that is tied
We have a pretty big ASP.NET WebForm (web application) project with a lot of
Imagine we have a webform page with a dynamically created checkbox and date time
I have a simple webform which have few text fields,leabels and Submit button. When
I have a simple webform that will allow unauthenticated users to input their information,
I have the following webform: <%@ Page Language=C# AutoEventWireup=true CodeBehind=Default.aspx.cs Inherits=TestWebApp.Default %> <!DOCTYPE html

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.