Find a Control in DataList Control
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi all I am editing a datalist and i am trying to upload file from that editing file my code ------------ Dim WriterID As String = DirectCast(e.Item.FindControl("WriterID"), Label).Text Dim Writer As String = DirectCast(e.Item.FindControl("Writer"), TextBox).Text Dim ImageFileName As String = DirectCast(e.Item.FindControl("ImageFileName"), TextBox).Text But the upfile (HtmlInputFile) control is not finding giving error 'System.NullReferenceException: Object reference not set to an instance of an object. ' Dim upfile As HtmlInputFile = DirectCast(e.Item.FindControl("upfile"), System.Web.UI.HtmlControls.HtmlInputFile) How can i found HtmlInputFile in my datalist control ThanQ Keerthi