file upload control
-
Hi all I want suggestions on following scenario 1.I have a image control on the web page. 2. I have FileUpload control 3. Button control to upload file to server When user will select a .jpg file using file upload control, I want to display that image in the image control. Once user is satisfied with the image, he will upload it to server by clicking on Button control. I have tried by implementing all events of FileUpload to refresh image control with the user selected image, but nothing worked out. can anyone pls guide me how can I refresh image control when user will select the file using file upload control. Thanks a lot.
-
Hi all I want suggestions on following scenario 1.I have a image control on the web page. 2. I have FileUpload control 3. Button control to upload file to server When user will select a .jpg file using file upload control, I want to display that image in the image control. Once user is satisfied with the image, he will upload it to server by clicking on Button control. I have tried by implementing all events of FileUpload to refresh image control with the user selected image, but nothing worked out. can anyone pls guide me how can I refresh image control when user will select the file using file upload control. Thanks a lot.
Save the file in your website and change the src to the location you saved the file.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
-
Save the file in your website and change the src to the location you saved the file.
how vital enterprise application are for proactive organizations leveraging collective synergy to think outside the box and formulate their key objectives into a win-win game plan with a quality-driven approach that focuses on empowering key players to drive-up their core competencies and increase expectations with an all-around initiative to drive up the bottom-line. But of course, that's all a "high level" overview of things --thedailywtf 3/21/06
Or if you are storing the image in a database, you'll have to make a helper page that fetches images (like GetPic.aspx?id=SOMEID), with code like this in the page_load.
int id = Convert.ToInt32(Request.QueryString["id"]); MyPics pic = new MyPics(id); Response.ClearContent(); Response.ContentType = "image/jpeg"; Response.OutputStream.Write(pic.Image, 0, pic.Image.Length); Response.End();
Then after you upload the file, stick it in the database and get the id back you just set the ImageURL property of the asp image controls to "~/GetPic.aspx?id=NEWID" or whatever you called the file.