how to use fileUpload control in asp.net

Posted by Gow.Net under ASP.NET on 9/7/2012 | Points: 10 | Views : 4680 | Status : [Member] | Replies : 2
hi any one explain and tell me solution for image upload using Asp .net
i am using FileUplaod Contro(ID="Img_upload")
In windows XP
Img_upload
{System.Web.UI.WebControls.FileUpload}
base {System.Web.UI.WebControls.WebControl}: {System.Web.UI.WebControls.FileUpload}
FileBytes: {byte[777835]}
FileContent: {System.Web.HttpInputStream}
FileName: "Penguins.jpg"
HasFile: true

PostedFile: {System.Web.HttpPostedFile}



in windows 7

Img_upload
{System.Web.UI.WebControls.FileUpload}
base {System.Web.UI.WebControls.WebControl}: {System.Web.UI.WebControls.FileUpload}
FileBytes: {byte[0]}
FileContent: {System.IO.Stream.NullStream}
FileName: ""
HasFile: false

PostedFile: null



in windows & wen i click upload button FileContent: {System.IO.Stream.NullStream} , FileName: "" , HasFile: false , i cant browse image file any one give me a possible solution to this

gowthaman8870226416


Responses

Posted by: Vasanthmvp on: 9/7/2012 [Member] Starter | Points: 25

Up
0
Down
Hi, I think it works fine in both windows xp & windows7.
Might be you are missing something.. If has file shows false, that means file is not been selected in to file upload control.

This article will definitely help you.

http://www.dotnetfunda.com/articles/article1084-saving-images-into-the-database-in-aspnet-and-displaying-to-the-gridview.aspx

Awesome Coding !! :)

Gow.Net, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vinay13mar on: 10/14/2012 [Member] Starter | Points: 25

Login to post response