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

[Solved] RadScriptBlock & In

3 Answers 208 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
mblaess
Top achievements
Rank 1
mblaess asked on 13 May 2008, 03:40 PM

Hello,

I have a lot of javascript-functions in my code that work like this:

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
function foo(sender)
{
    ....
}
</telerik:RadScriptBlock>
I'm calling these functions this way:

<img name="foo" onclick="return foo('<%=me.ClientID %>');" />
This throws the infamous "Control Collection"-Error.
I dont't want to change all the function calls - this would require more than a week !
How can I use inline asp-tags in HTML-Controls ?

Kind Regards,
Michael

3 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 14 May 2008, 06:41 AM
Hello mblaess,

The easiest solution is to wrap the image tag in this case within RadCodeBlock control. You can read more about that here.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
mblaess
Top achievements
Rank 1
answered on 14 May 2008, 12:54 PM
Dear Konstantin,

thank you very much. It works now - but its a lot of work ...

We also have Inline-ASP-Code in DIV-Tags. Wrapping a RadCodeBlock around a div-Tag prevents VS 2005 from rendering the form in Design-Mode (Missing EndTag).

Kind Regards,
Michael



0
Konstantin Petkov
Telerik team
answered on 15 May 2008, 05:28 AM
Hello Michael,

I checked that but there is no problem due to RadCodeBlock wrapping divs. The design-time problem should be somewhere else, find my simple test page attached.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Ajax
Asked by
mblaess
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
mblaess
Top achievements
Rank 1
Share this question
or