Showing posts with label datatable. Show all posts
Showing posts with label datatable. Show all posts

Saturday, March 24, 2012

please help , build datatable of FileUpload , or DataColumn , datatype of FileUpload

hello , I'm trying to create tatatable to store list of fileuploads to use them to patch upoad

my problem is to create the (DataColum)

this is my code

1DataTable My_Dt =new DataTable();23 DataColumn myDataColumn =new DataColumn("ColName", Type.GetType("System.Web.UI.WebControls.FileUpload",true));4 My_Dt.Columns.Add(myDataColumn);5
 It gives me error
/*****/ 
 Could not load type 'System.Web.UI.WebControls.FileUpload' from assembly 'App_Web_5dgo8bbt, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.
 /******/
so anyone provide any help to do this ?
thanks in advance,. 
 

I don't think you can create a datacolumn with a datatype of FileUpload control.
If you are trying contain the file name, then all you need is a text column. Then, when populating your datatable, add in the string equivalent of the filename.
Hope this helps.


well, thank you rof your response

I got it

let me share it with you

DataTable My_Dt = new DataTable();
Type type = FileUpload1.GetType();//it's in my form
DataColumn myDataColumn = new DataColumn("ColName", type);
My_Dt.Columns.Add(myDataColumn);

I hope this helps you in future, lol

PLEASE HELP ASP.NET PROBLEM

Dear All,

I have encountered a very strange problem with DataBinding a repeater.

1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk

Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick

"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?

PLEASE HELP ASP.NET PROBLEM

Dear All,
I have encountered a very strange problem with DataBinding a repeater.
1. I have a DataTable that has 100 record (3 columns with number only and
the records count is also confirmed)
2.I have created a proper Repeater
3. The Repeater has a databinding with the datatable
4.When I databind() the repeater, only some of the records get rendered and
the remaining aspx file ends up incomplete! it is as though the databinding
breaks at some point resulting the page not being parsed correctly.
5. I am using .NET 1.1 with spk
Has anyone ever seen something like this?Can you provide more info or where the error is existing in your code.
Patrick
"Yet another C# coder" <gevik@.hotmail.com> wrote in message
news:O$9ScPKuFHA.3236@.TK2MSFTNGP14.phx.gbl...
> Dear All,
> I have encountered a very strange problem with DataBinding a repeater.
> 1. I have a DataTable that has 100 record (3 columns with number only and
> the records count is also confirmed)
> 2.I have created a proper Repeater
> 3. The Repeater has a databinding with the datatable
> 4.When I databind() the repeater, only some of the records get rendered
and
> the remaining aspx file ends up incomplete! it is as though the
databinding
> breaks at some point resulting the page not being parsed correctly.
> 5. I am using .NET 1.1 with spk
> Has anyone ever seen something like this?
>