Setting ID and Bind parameter for dinamicaly generated FCKeditors

F

Fixer

There is Content Management System. In it on administrator's side dinamic
number of "body" (which showing in FCKeditors) elements for generating page
Code
--------------------------------------------------------------------------------
<%
Dim bodyCounter As Integer = 1
'Ð¸Ð¼Ñ ÐºÐ¾Ð½Ñ‚ÐµÐ¹Ð½ÐµÑ€Ð° body
Dim bodyContainerName As String = ""
Dim bodyContainerBindingName As String = ""
Do
bodyContainerName = "bodyFCKeditor" +
bodyCounter.ToString
bodyContainerBindingName = "body" +
bodyCounter.ToString
%>
<tr>
<td colspan="2">
Содержимое Ñтраницы (body<%=bodyCounter%>):
</td>
</tr>
<tr>
<td colspan="2">
<FCKeditorV2:FCKeditor
ID="<%=bodyContainerName%>" runat="server" Height="500px" Value='<%#
Bind(bodyContainerBindingName) %>' Width="700px">
</FCKeditorV2:FCKeditor>
</td>
</tr>
<%
bodyCounter += 1
Loop While (bodyCounter <= bodyNumber)

%>


--------------------------------------------------------------------------------
Return Errors:
Error 1 '<%=bodyContainerName%>' is not a valid identifier.
Error 2 A call to Bind was not well formatted. Please refer to documentation
for the correct parameters to Bind.
---
How I can correct it?



---
I wrote function for output FCKeditors:


code:
--------------------------------------------------------------------------------
Function getBodyContainers(ByVal bodyNumber As Integer)
Dim bodyContainers As String = ""
Dim bodyCounter As Integer = 1
Dim bodyContainerName As String = ""
Do
bodyContainerName = "bodyFCKeditor"

bodyContainers += "<tr>" + Environment.NewLine + _
" <td colspan=""2"">" + Environment.NewLine + _
" Содержимое Ñтраницы (body" +
bodyCounter.ToString + "):" + Environment.NewLine + _
" </td>" + Environment.NewLine + _
" </tr>" + Environment.NewLine + _
" <tr>" + Environment.NewLine + _
" <td colspan=""2"">" + Environment.NewLine + _
" <FCKeditorV2:FCKeditor ID=""" +
bodyContainerName + """ runat=""server"" Height=""500px"" Value='<%#
Bind(""body"") %>' Width=""700px"">" + Environment.NewLine + _
"</FCKeditorV2:FCKeditor>" + Environment.NewLine + _
" </td>" + Environment.NewLine + _
" </tr>" + Environment.NewLine
bodyCounter += 1
Loop While (bodyCounter <= bodyNumber)
Return bodyContainers
End Function
 
A

Anthony Jones

Fixer said:
There is Content Management System. In it on administrator's side dinamic
number of "body" (which showing in FCKeditors) elements for generating page

This group is for Classic ASP you need a group for ASP.NET
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,237
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top