Newbie question

  • Thread starter Thread starter Frank Rizzo
  • Start date Start date
F

Frank Rizzo

Sorry for what maybe a complete newbie question. I need to display a
web page which list files in a certain directory with a checkbox next to
each of them. The users would check whatever checkboxes they needed and
press the Submit button. On the server, I'd need to go through the
checked entries and process them.

So in classic ASP, you just build a table dumping file names and <input
type=checkbox name=file_xxx.txt...> next to each one of them. Then on
the server, I'd loop through all .form.key starting with file_ and be done.

How would one do something like this in ASP.NET. What controls should I
use?

Thanks
 
Frank Rizzo said:
Sorry for what maybe a complete newbie question. I need to display a
web page which list files in a certain directory with a checkbox next to
each of them. The users would check whatever checkboxes they needed and
press the Submit button. On the server, I'd need to go through the
checked entries and process them.

So in classic ASP, you just build a table dumping file names and <input
type=checkbox name=file_xxx.txt...> next to each one of them. Then on
the server, I'd loop through all .form.key starting with file_ and be done.

How would one do something like this in ASP.NET. What controls should I
use?

Take a look at the DataGrid control. Alternatively, if you want more
control, you could use the DataList or Repeater controls.
 
First, get the filenames into an array. For the gui part, you should use a
datagrid with TemplateColumn. Include a checkbox in the item template.
Databind checkbox's Text property to the array of filenames.

Eliyahu
 
Back
Top