Solved

what is wrong with this syntax ?

Posted on 2009-06-29
2
383 Views
Last Modified: 2012-05-07
I am getting a javascript error when I put this syntax on aspx page - what is wrong with this  OnClientSelectedIndexChanged='<%# "ShowPercentage(\"" + Container.FindControl("rcbActivityCodes").ClientID + "\",  \"" + Container.FindControl("rntPercentage").ClientID + "\")" %>' ?  
                 
<telerik:RadComboBox ID="rcbActivityCodes"  EnableAjaxSkinRendering="true" runat="server"
                       OnClientSelectedIndexChanged='<%# "ShowPercentage(\"" + Container.FindControl("rcbActivityCodes").ClientID + "\",  \"" + Container.FindControl("rntPercentage").ClientID + "\")" %>' >

Open in new window

0
Comment
Question by:tech_question
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

Expert Comment

by:abel
ID: 24740278
That depends on what that renders to when your page is loaded and/or whether ShowPercentage does not exist and/or what error you get. Can you update with answers to these three questions?
0
 
LVL 12

Accepted Solution

by:
wht1986 earned 500 total points
ID: 24740322
On the telerik controls, you can specify that function.  OnClientSelectedIndexChanged has a specific signature it looks for.  Please see the documentation here
http://www.telerik.com/help/aspnet-ajax/combo_clientsideonclientselectedindexchanged.html

basically all you can do is specify the name of the jabascript method
<telerik:RadComboBox  ID="RadComboBox1"  runat="server" OnClientSelectedIndexChanged="OnClientSelectedIndexChanged" />

The parameter values are set by telerik code
function OnClientSelectedIndexChanged(sender, eventArgs)
{
 var item = eventArgs.get_item();
 sender.set_text("You selected " + item.get_text());
}
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question