Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
VB
Function userpage(ByVal form As FormCollection, ByVal file As HttpPostedFileBase) As ActionResult
        Dim mn As MVBC.userpage = New userpage()
        Dim q As String = mn.resume1

        mn.name = form("txtName")

        mn.phn = form("txtPhn")
        mn.highestedu = form("Education")
        mn.gender = form("Gender")
        mn.field = form("Field")
        mn.Email = form("txtEmail")
        Dim image As String = form("file1")
        Dim resume1 As HttpPostedFileBase = Request.Files("resume")
        Dim filetoUpload As HttpPostedFileBase = Request.Files("file1")
        If filetoUpload.FileName <> "" Then
            Dim ext As String = System.IO.Path.GetExtension(filetoUpload.FileName).ToLower()
            If ext <> ".jpg" AndAlso ext <> ".png" AndAlso ext <> ".jpeg" Then
                ViewBag.q = "Please Upload Valid Format Image"
                Return RedirectToAction("welcome", "Seema")
            Else

                Dim imagename As String = System.IO.Path.GetFileName(filetoUpload.FileName)
                '   Dim phyisal As String = Server.MapPath(Convert.ToString("~/Content/images/") & imagename)
                Dim path As String = System.IO.Path.Combine(Server.MapPath("~/Content/images"), imagename)
                filetoUpload.SaveAs(path)

                mn.filetoUpload = filetoUpload.FileName
                '  file.SaveAs(phyisal)
                ViewBag.q = "File Uploaded Successfully"
            End If
        End If
        Dim ext1 As String = System.IO.Path.GetExtension(resume1.FileName)
        If (ext1 <> ".doc") AndAlso (ext1 <> ".docx") AndAlso (ext1 <> ".pdf") Then
            ViewBag.q = "Please Upload Valid Format Resume"
            Return RedirectToAction("welcome", "Seema")
        Else
            mn.resume1 = mn.Email & resume1.FileName
            Dim resumenamwe As String = System.IO.Path.GetFileName(resume1.FileName)

            '   mn.resume1 = resumenamwe
            Dim respath As String = System.IO.Path.Combine(Server.MapPath("~/Content/Resumes"), mn.resume1)
            resume1.SaveAs(respath)
        End If

        ViewBag.m1 = mn

        ViewBag.xm = Createxml(mn)

        Return View()
    End Function
Posted
Updated 6-Jul-15 20:18pm
v2
Comments
Sergey Alexandrovich Kryukov 6-Jul-15 9:14am    
I have only one question at the moment: what does it mean, "click on controller"?
—SA
Khushi Saraswat 7-Jul-15 1:44am    
I know that dear but in this project there is some prb when i click it did'nt show.
Khushi Saraswat 7-Jul-15 1:44am    
but d'nt mine you also correct
Sergey Alexandrovich Kryukov 7-Jul-15 2:17am    
Thank you, dear, but it would be better if you simply answered my question, to clarify yours. It can really help you to get answers. Also, you need to format the code sample using "pre" HTML element, to make it readable. Please click "Improve question" to see how I did it for you, and next time, please do it yourself.
—SA

1 solution

It seems to be u have tried to update your visual studio and leave it in mid way without completing it.... Simply go to visual studio and uninstall it and then install it...
please let me know whatever problem u face....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900