debanjan.dutta
Member
- Joined
- Aug 26, 2006
- Messages
- 6
- Programming Experience
- 3-5
hi all,
am facing a weird problem while uploading an html file to the web server. Am using an <input type=file runat=server id=file1> control. then when the user is clicking upload the following code part is getting executed
Now when an html file containing images in it like <img src="c:\abc.jpg">
is uploaded, the text contents of the html file are getting saved but the image is not coming along with the html file. What can I do to make this work...plzzz suggest
am facing a weird problem while uploading an html file to the web server. Am using an <input type=file runat=server id=file1> control. then when the user is clicking upload the following code part is getting executed
VB.NET:
if file1.value.trim<>"" then
if file1.postedfile.contentlength > 0 then
dim file_name as string=file1.postedfile.filename
dim file_ext as string=path.getExtension(file_name)
dim name_only as string=path.getFileName(file_name)
if file_ext=".htm" or file_ext=".html" then
me.file1.postedfile.saveAs(server.mapPath(name_only))
end if
end if
end if
Now when an html file containing images in it like <img src="c:\abc.jpg">
is uploaded, the text contents of the html file are getting saved but the image is not coming along with the html file. What can I do to make this work...plzzz suggest