Click here to Skip to main content
15,885,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I am trying to make a grid or list in asp.net which have textboxes over it and can add, edit, delete rows without using database.
can someone help me out here I'm new to list and grid in asp.net
Posted

1 solution

You mentioned, GridView or ListView as you said "make a grid or list". That is the actual problem in this question of yours. You are not sure of what to do. Let me tell you the basic different between both of them.

ListView is used to stack the visual controls vertically. Every element comes after the other, next to it. Just as a ListBox does, the different is that you get to edit how each of these controls would render rather than like ListBox did by calling ToString function.

GridView on the other hand stacks the visual controls horizontally, one after the other. You also get to control the width and heights of them.

It depends on what you want to make,

1. If you want to create a view similar to a Music Library, where each song gets stacked right under the previous, use ListView.
2. If you want to create an image gallery and want to show the controls (Image) in a grid, use GridView.

But remember, these controls are from ASP.NET Web Forms, the new versions of ASP.NET provides you with ASP.NET MVC only, Web Forms is removed and other frameworks are integrated in ASP.NET MVC.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900