aspx页面中的arraylist [英] arraylist in aspx page

查看:109
本文介绍了aspx页面中的arraylist的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我又遇到麻烦了.我要在aspx.cs页中有一个arraylist,我想在div2之间的aspx页中打印它.

hi guys,


I am again in trouble. I have an arraylist in aspx.cs page I want to print it in aspx page between div2.

推荐答案

1)给div2 ID="div2" runat="server"属性.
2)在后面的代码中,使用foreach遍历arraylist.
a)对于arraylist中的每个项目,将值附加到StringBuilder.
3)将StringBuilder结果应用于div2内容.
1) Give your div2 ID="div2" runat="server" attributes.
2) In your code behind, iterate through the arraylist using a foreach.
a) for each item in the arraylist, append the value to a StringBuilder.
3) Apply the StringBuilder result to div2 content.


这篇关于aspx页面中的arraylist的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆