转换对象以从arraylist中检索单个值 [英] casting of object to retrieve individual value from arraylist

查看:104
本文介绍了转换对象以从arraylist中检索单个值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,因为我是c#的新手。我做了一个arraylist并存储我的uid并希望把它放到一排图片中


pic 1,pic 2,pic 3,pic 4


这是我的代码把uid放在arraylist


pofile2.aspx.cs

展开 | 选择 | Wrap < span class =codeDivider> | 行号

解决方案

< blockquote>你的错误可能是通过说System.Collections.ArrayList

(或为它添加System.Collections命名空间)来解决的。


但是,如果你有兴趣在网页中显示tabluar数据,我建议查找DataTable对象(和SqlDataAdapter来填充它),然后使用GridView对象来处理表构建


在哪里做我把系统。我在ASPX页面中收藏.ArrayList



喜欢<%System.Collections.ArrayList;%>


对不起我真的很新


我会转到代码文件,因为异常可能就行了:

ArrayList list2 = new ArrayList();

并将光标放在第一个ArrayList字上。最后一个字母下面可能会出现一条红线。如果你移动它,会出现一个下拉列表,允许你添加命名空间吗?


Hi, i am having a problem as im new to c#. I did an arraylist and store my "uid" and want to put it into a row of pictures

pic 1 , pic 2 , pic 3, pic 4

this is my code for putting the "uid" the arraylist

pofile2.aspx.cs

Expand|Select|Wrap|Line Numbers

解决方案

Well your error could probably be fixed by saying System.Collections.ArrayList
(or adding the System.Collections namespace for it)

However, if you are interested in display tabluar data in a webpage, I recomend looking up the DataTable object(and the SqlDataAdapter to fill it), then using a GridView object to handle the table building


where do i put the System.Collections.ArrayList
in my ASPX page?
Like <%System.Collections.ArrayList ;%>

Sorry Im really new to this


I would go to the code file, since the exception is probably on the line:
ArrayList list2 = new ArrayList();
And put the cursor over the first ArrayList word. A little red line will probably appear under the last letter. If you move over it, a drop down will appear allowing you to add the namespace if you want?


这篇关于转换对象以从arraylist中检索单个值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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