TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
kourosh saleh
NA
3
0
problem with ArrayList
Feb 14 2006 7:15 AM
Hi,
I have a little problem with ArrayList that make me crazy,
I have a usual Web Application that contains two Buttons,
When i click on Button1 it would add an object to MyArrayList and Button2 Shows the Objects.
but MyArrayList.Count is Zero allways.
here is my code:
public partial class DoFeed : System.Web.UI.Page
{
private ArrayList TheItems = new ArrayList();
protected void Page_Load(object sender, EventArgs e){ }
protected void Button1_Click(object sender, EventArgs e)
{
OneItem Item = new OneItem();
Item.Title = TitleTXT.Text;
Item.Link = LinkTXT.Text;
TheItems.Add(Item);
}
protected void Button2_Click(object sender, EventArgs e)
{
int m = TheItems.Count; //it is zero allways
for(int i=0; i<TheItems.Count i++)
.......
}
}
Reply
Answers (
4
)
How to hide cut,copy, paste menu (shortcut menu) in Datagridview cell?
How to add a page break when write to file