hi!
i am using fileupload control to display the image in image control.
means when i select image in fileupload window and i click open button then that image is displayed in image control.
please give code urgent sir.
Thank u.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Lalit MRank #1,186 · 1.5K reputationPosted Feb 16, 2010, 2:17 AM EST
function LoadImage() { document.getElementById('img').src=document.getElementById('File1').value; } on .aspx.cs pagehtml> head> script type="text/javascript"> function validate(oForm){ if (!/(\.(gif|jpg|jpeg|bmp|png))$/i.test(oForm.file1.value)){ alert("Please attach an image."); oForm.file1.focus(); return false; } return true; } script> head> body> form name="uploadForm" action="upload.php" method="post" enctype="multipart/form-data" onsubmit="return validate(this)" /> input type="file" name="file1" /> input type="submit" value="Save" /> form> body> html>Lalit MRank #1,186 · 1.5K reputationPosted Feb 16, 2010, 2:21 AM EST
http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=58952
more info here
Lalit MRank #1,186 · 1.5K reputationPosted Feb 16, 2010, 6:28 PM EST
Test it by locating a valid file on your hard drive:
Lalit MRank #1,186 · 1.5K reputationPosted Feb 21, 2010, 9:00 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts