Take the 2-minute tour ×


    <script type = "text/javascript">
            var counter = 0;

            function AddFileUpload() {
                var div = document.createElement('DIV');
            function RemoveFileUpload(div) {
            $(document).ready(function () {



        <br /><br />
        <div id = "FileUploadContainer">
        <br />
        <br />

            For i As Integer = 0 To Request.Files.Count - 1
                Dim PostedFile As HttpPostedFile = Request.Files(i)
                If PostedFile.ContentLength > 0 Then
                    Dim FileName As String = System.IO.Path.GetFileName(PostedFile.FileName)

                End If
        End Sub
share|improve this question
add comment

1 Answer

Your question is a bit confusing.. But by the things that i have understood from your question. i would say if u have problem of adding forms into your content form u can remove form from the master page and then u have to add forms to each content form you will add.

Bu if you want multiple forms in your page u can do so by making only one form visible at a time.

But see to it that the form is in another placeholder from the one which already had form in it. Question is a bit confusing but hope i was able to give u solution ...

share|improve this answer
no what i mean what i not able to save the image –  actKing Feb 3 '12 at 8:14
what is the error that you are getting or there is no error message at all?... –  RohitWagh Feb 3 '12 at 8:22
there no error, i update my code, basically i have a javascript which have a input that allow me to upload a file or image, but the problem, it seem like total skip the code inside –  actKing Feb 3 '12 at 8:27
you understand what i mean? –  actKing Feb 3 '12 at 8:33
Yes got your Problem. It seems like the JavaScript code creates the control on fly and is not adding it to the actual code (check in view source). Thus asp.net is not getting any thing to upload. –  RohitWagh Feb 3 '12 at 8:47
show 7 more comments

Your Answer


