Hi shahid
I think u need to define one INPUT on your ASPX from
<INPUT id="Upload" type="file" name="fileUpload" runat="server">
Using the abouve u will also get a BROWSE button , u can browse the path of
your file and
U also need to have one more button to UPLOAD your file. u can use <asp:Button>
And on cilck event of this button u should use this code
Dim cond As Boolean = False
Dim myfile As FileStream
Dim Fname As String
Fname = Upload.PostedFile.FileName
Fname = System.IO.Path.GetFileName(Fname)
Try
Upload.PostedFile.SaveAs(Server.MapPath("./PDFFiles/") + Fname) ' PDFFiles is
your folder on HTTP SERVER
entit = "<script>"
entit = entit & "alert('Image Inserted Successfully ')"
entit = entit & "</script>"
Page.RegisterStartupScript("ClientScript", entit)
Catch err As Exception
entit = "<script>"
entit = entit & "alert('Unable To Insert The Record')"
entit = entit & "</script>"
Page.RegisterStartupScript("ClientScript", entit)
End Try
End If
Enjoy the code...
Regards
Parvez Khan
--- Original Message -----
From: shahid akhtar
To: [email protected]
Sent: Wednesday, July 13, 2005 1:17 AM
Subject: [AspNetAnyQuestionIsOk] how to upload file from browse option in asp
.net
plz help me'
---------------------------------
Too much spam in your inbox? Yahoo! Mail gives you the best spam protection
for FREE!
http://in.mail.yahoo.com
[Non-text portions of this message have been removed]
------------------------------------------------------------------------------
YAHOO! GROUPS LINKS
a.. Visit your group "AspNetAnyQuestionIsOk" on the web.
b.. To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
------------------------------------------------------------------------------
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/