Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. plzz tell how file is uploaded using browser...........

plzz tell how file is uploaded using browser...........

Scheduled Pinned Locked Moved ASP.NET
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    manish srivastava
    wrote on last edited by
    #1

    plzz tell how file is uploaded using browser button on page. it means write code to read file,upload and browse button & write code to save and selected file to browser....

    P M 2 Replies Last reply
    0
    • M manish srivastava

      plzz tell how file is uploaded using browser button on page. it means write code to read file,upload and browse button & write code to save and selected file to browser....

      P Offline
      P Offline
      PavanPareta
      wrote on last edited by
      #2

      please put his code in html site and manage yourself where ever you want to save your file there is method for saveing file. Cool <%@ Page Language="vb" AutoEventWireup="false" Codebehind="aaaaaa.aspx.vb" Inherits="civilesengineers.aaaaaa"%> aaaaaa Private Function PickupFileNameWithExtasion(byval sttr as string) as String Dim st As String = Trim(sttr) Dim sr As String dim cs as String Dim f, k As Integer sr = StrReverse(st) f = InStr(sr, "\") k = f - 1 cs = StrReverse(Mid(sr, 1, k)) PickupFileNameWithExtasion = cs End Function ' Upload Files Function Sub UploadBtn_Click(Sender as Object, e as EventArgs) dim strLocalPath as string dim strFileName as string dim i as integer=2 Dim popUpScript As String if MyFile.PostedFile.FileName <> "" then 'FileName.InnerHtml = MyFile.PostedFile.FileName 'MyContentType.InnerHtml = MyFile.PostedFile.ContentType 'ContentLength.InnerHtml = cStr(MyFile.PostedFile.ContentLength) ' ' Making Path and File Name ' strFileName = PickupFileNameWithExtasion(MyFile.PostedFile.FileName) MyFile.PostedFile.SaveAs(ConfigurationSettings.AppSettings("MyPath")& strFileName) Else End if End Sub Upload Your File ================ **Selec New Usert File To Upload to Server:**

      1 Reply Last reply
      0
      • M manish srivastava

        plzz tell how file is uploaded using browser button on page. it means write code to read file,upload and browse button & write code to save and selected file to browser....

        M Offline
        M Offline
        minhpc_bk
        wrote on last edited by
        #3

        manish srivastava wrote:

        it means write code to read file,upload and browse button & write code to save and selected file to browser....

        It seems you want CP to do all what you need, then what else would you do? Just copy/paste like Mark said in the other post? Oh boy, you are loosing your fun of writing code and being a programmer shouldn't appear in your mind.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups