Last post Aug 21, 2008 02:41 PM by ASQ
Aug 21, 2008 05:01 AM|vazhuthik|LINK
we are the windows mobile web developers. we have some problems in list out the repeated controls. For example the view inbox mails.
The same controls are repeater. In ASP.NET have the repeater control, this control to fullfill this problem. But windows mobile Compact Framework did't have any control for this.
pls any solution or idea for this problem.
Aug 21, 2008 02:41 PM|ASQ|LINK
Well, I am not sure if this is the easiest or best way of doing it, but I would run a loop in Page_Load. In this loop I will use the data items (such as the list of e-mails - one by one) and bind each of them programmatically (on the fly) to a mobile link.
With each iteration of the loop, I will add the well-formed strings (mobile links code with all the necessary tags, etc.) to a string variable. The text in the variable should come out looking something like this:
<mobile:Link ID="link1" Runat="server" NavigateUrl="~/yourlink1.aspx" StyleReference="link">link1 text</mobile:Link><mobile:Link ID="link2" Runat="server" NavigateUrl="~/yourlink2.aspx" StyleReference="link">link2 text</mobile:Link><mobile:Link ID="link3"
Runat="server" NavigateUrl="~/yourlink3.aspx" StyleReference="link">link3 text</mobile:Link>
Then, you put the variable inside your mobile web page, and then when the page load. you load your "programmatically build up" list of links to that variable inside the Mobile Form - in other words introducing all the well formed code inside the Mobile Form.
This should give you a similar (but scaled down) result as using a Repeater control on a normal web page.
You will have to play around with it a bit, but this should do the trick.