mobile controls in a "for" loop


S

SJ

Hi,

I'm trying to do something like the following:

<mobile:Form Runat="server" id="Form1">
<% for ( int i = 0 ; i < 4 ; i++ ) %>
<% { %>
<mobile:Image id="MyImage" ImageURL="test.png"
Runat="server"></mobile:Image>
<% } %>
</mobile:Form>

Essentially, trying to create a mobile Image within a for loop. But I keep
getting the following compile error:

Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: CS1513: } expected
Source Error:

Line 110: #line default
Line 111: #line hidden
Line 112: }
Line 113:
Line 114: private System.Web.UI.Control __BuildControlmyImage() {
Source File: c:\WINNT\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET
Files\testproject\826ef180\566fe267\zocq9yhr.0.cs Line: 112

-------------------------------

Line 105: private void
__Render__control2(System.Web.UI.HtmlTextWriter __output,
System.Web.UI.Control parameterContainer) {
Line 106:
Line 107: #line 11
"http://localhost/TestProject/MobileWebForm2.aspx"
Line 108: for(int i=0; i< list.Count;i++) {
Line 109:
Line 110: #line default
Line 111: #line hidden
Line 112: }
Line 113:
Line 114: private System.Web.UI.Control __BuildControlmyImage() {



I don't see where i'm missing a curly brace.
Are mobile controls restricted in the sense that they cannot be rendered in
a loop? If I do the same thing with ASP.NET web controls, it works just
fine.

thanks,
-SJ.
 
Ad

Advertisements


Top