This is a migrated thread and some comments may be shown as answers.

Can I define my own Client IDs when I place controls on a page?

1 Answer 24 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Klaus
Top achievements
Rank 2
Klaus asked on 12 Oct 2009, 12:36 PM

I recently purchased the AJAX RADControls since read that it is one of the best AJAX libraries available.

I am trying to move my web apps into AJAX. I use server controls only for the initial page rendering of the DOM elements and then make web-service calls (using PageMethods or WCF) to populate or manipulate any grids, forms or data that exist in the page.

I added some of the Telerik controls to replace plain HTML tags (such as drop-down lists, inputs, etc.) but it is difficult it is to find these controls in the DOM in order to manipulate them (especially when they are embedded within other ASP.Net server controls).

To find a Telerik Control I have to resort to such calls as:
 
var combo = $find("<%= RadComboBox1.ClientID %>");
var item = combo.findItemByText(text);

(By the way, this code above will NOT run when you place your script code in a separate JS file which is a best practice that I prefer to follow.)

I am trying to use these controls for 100% strictly data access via AJAX.
I don't need the ASP.Net engine to assign them an ID in the DOM, I want to control this ID myself so that I can more easily access them from my scripts.

Can I define my own Client IDs when I place controls on a page declaratively or programmatically?

Can I assign the Client IDs of the RADControls when using ASP.NET MVC?

Let me know if this level of control is possible with RADControls.

Klaus Barkhausen

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 15 Oct 2009, 03:21 PM
Hello Klaus,

Unfortunately the required functionality is not attainable.
ASP.NET 4.0 will allow to configure the client IDs of the controls.

All the best,
Georgi Krustev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Klaus
Top achievements
Rank 2
Answers by
Georgi Krustev
Telerik team
Share this question
or