473,396 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Setting ID and Bind parameter for dinamicaly generated FCKeditors

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
--------------------------------------------------------------------------------
But in output i got a text of tags.
What I can do to get companents but not tags of components?

Feb 1 '07 #1
2 3977
you can not use <%= %tags with server controls. you must use a binding
expression <%# %>. the binding expressing will be evaluated when you
call the databind for the control.

-- bruce (sqlwork.com)

Fixer wrote:
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
--------------------------------------------------------------------------------
But in output i got a text of tags.
What I can do to get companents but not tags of components?
Feb 1 '07 #2
"bruce barker" wrote:

you can not use <%= %tags with server controls. you must use a binding
expression <%# %>. the binding expressing will be evaluated when you
call the databind for the control.

<FCKeditorV2:FCKeditor ID="<%#bodyContainerName%>" runat="server"
Height="500px" Value='<%#bodyContainerBindingName%>' Width="700px">
Generate errors:

Error 1 The ID property of a control can only be set using the ID attribute
in the tag and a simple value. Example: <asp:Button runat="server"
id="Button1" /> C:\Documents and Settings\Администратор\Мои документы\Visual
Studio 2005\aurore-dodge\cms\forms\shablon_article.aspx 270
Error 2 Name 'bodyContainerBindingName' is not declared. C:\Documents and
Settings\Администратор\Мои документы\Visual Studio
2005\aurore-dodge\cms\forms\shablon_article.aspx 270

May be where is some better way to realise queston?
Feb 2 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Paulo Pinto | last post by:
Hi, I have a package that generates classes from a set of XML files using exec. So far the classes appear in the global namespace. Is there any way to also create packages dinamicaly and...
4
by: Arturo Cuebas | last post by:
The program below contains a compile error. Following the program you will find the typical fix then my idea for a library that facilitates a more elegant fix. #include <boost\bind.hpp> using...
3
by: CSDunn | last post by:
Hello, I currently have an Access 2003 ADP Report/Subreport set up in which I have 12 subreports in a single main report that are located in a group header called 'PermnumHeader' (Permnum would be...
2
by: Luke Dalessandro | last post by:
I am trying to develop a quick Shopping cart for ASP.NET 2.0. I have added a CartItems table to the AspNetDB access database, that contaings CartItems keyed off of the aspney_Users.UserId key (the...
5
by: Arjen | last post by:
Hi, How can I set the navigate URL with parameter without extra code? I have now this: NavigateUrl="~/test2.aspx?ID=" + <%# Bind("Id") %> There must be a way to do this with a string...
1
by: Frank Yamrick | last post by:
I am trying to program an application that requires a large number of screnes that are very similar in the respect that all the bottons and labels interact with each other with the same...
0
by: teclioness | last post by:
Hi, I am using gridview for the user to update rows. In a row, there sre two columns, which need to be updated. When the gridview is to be shown, the row should show the values from database....
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
1
by: =?Utf-8?B?Rml4ZXI=?= | last post by:
There is Content Management System. In it on administrator's side dinamic number of "body" (which showing in FCKeditors) elements for generating page Code...
5
by: dana1 | last post by:
Hello Experts! Does anyone know if there is a way to set the values of query parameters from VBA for a report's recordsource? (i.e., I want to set the values of the parameters and NOT have the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.