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

[Solved] Is the Id Bug Fixed?

2 Answers 88 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adam Gritt
Top achievements
Rank 1
Adam Gritt asked on 31 Aug 2010, 08:10 PM
We are currently using the 2010.2.825 release of the Telerik MVC controls for which the Release Notes state:
Fixed: Id property of ViewComponentBase does not replace "[" and "]" with "_"

but when I look at the code and in using the components the fix is no longer included.  It was fixed in the Beta release but in the current full release the source code is as follows: 

                return HtmlAttributes.ContainsKey("id") ?
                       HtmlAttributes["id"].ToString() :
                       (!string.IsNullOrEmpty(Name) ? Name.Replace(".", HtmlHelper.IdAttributeDotReplacement) : null);

Did this bug fix get rolled out in the change from 2010.2.713 or is the download for the source just not correct?

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 01 Sep 2010, 06:57 AM
Hello Adam Gritt,

This is the right code. The . in the ID must be replaced with _ as with any of the built-in ASP.NET MVC extensions. Why do you think this code is wrong?

The fix for the bug you are mentioning is in the Start method of the ClientSideObjectWriter class.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Adam Gritt
Top achievements
Rank 1
answered on 01 Sep 2010, 02:09 PM
Ok, I see what the problem is now.  

When we were using the Beta release (2010.2.713) the fix was to update the Id value to 
replace the "[" and "]" with "_".  The Release (2010.2.825) changed this so that it 
references items by using the "[" and "]" instead of replacing them with an underscore.  
We had some javascript code that was looking up the controls we had on a page expecting 
the id to be different based on how the previous beta was implemented.
Tags
General Discussions
Asked by
Adam Gritt
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Adam Gritt
Top achievements
Rank 1
Share this question
or