Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5963957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T19:20:46+00:00 2026-05-22T19:20:46+00:00

In my cshtml i have defined a tag I am creating a Image Upload

  • 0

In my cshtml i have defined a tag

I am creating a Image Upload Form, where On File Submit, i am saving the value in a Temp Table(SQL) and returning(GUID) the value thru a Ajax call and Binding the GUID inside Dynamically created DIV Tag(Jquery/Javascript)

<div id="dvDisplayImageParent" class="block clear" runat="server">

                </div>

Now, using Javascript i am creating DIV Tags (Multiple) (Containing Images and Textbox) and appending it with dvDisplayImageParent.

I want to access the values in Controller

public ActionResult NewProject(ProjectEditViewModel model, String btnSave)
    {// Want to values inside my dvDisplayImageParent }

How can i do this??

My Javascript is as follows :-
`var img = document.createElement(“IMG”);
var lbl = document.createElement(“label”);
var chk = document.createElement(‘input’);
chk.type = ‘checkbox’;

                                    //Assign image path to display the image
                                    img.src = imgPath;
                                    img.id = imageID;
                                    img.style.height = "100px";
                                    img.style.width = "100px";

                                    //Appending it with Dynamic DIV
                                    dynDiv.appendChild(img);

                                    var input = document.createElement("input");
                                    //input.setAttribute("type", "hidden");
                                    input.setAttribute("type", "text");
                                    input.setAttribute("name", "hdn" + imageID);
                                    input.setAttribute("value", imageID);


                                    //Image Link
                                    var aElemImageLink = document.createElement('a');
                                    //Move Up Link
                                    var aElemUpLink = document.createElement('a');
                                    //Move Down Link
                                    var aElemDownLink = document.createElement('a');

                                    var callOnImageclick = "DeleteImage('" + imageID + "','" + divDynamicID + "'); return false; ";
                                    aElemImageLink.setAttribute("onclick", callOnImageclick);
                                    aElemImageLink.childNodes = imageID;
                                    var callOnMoveUpclick = "MoveImageUP('" + imageID + "','" + divDynamicID + "'); return false; ";
                                    aElemUpLink.setAttribute("onclick", callOnMoveUpclick);
                                    var callOnMoveDownclick = "MoveImageDOWN('" + imageID + "','" + divDynamicID + "'); return false; ";
                                    aElemDownLink.setAttribute("onclick", callOnMoveDownclick);

                                    //Create a text node to hold the text of the <a>
                                    var aElemTN = document.createTextNode('     Delete Image           ');
                                    //Create a text node to hold the text of the <a>
                                    var aElemTNUp = document.createTextNode('     Move UP               ');
                                    //Create a text node to hold the text of the <a>
                                    var aElemTNDown = document.createTextNode('     Move DOWN           ');

                                    //Append the <a> text node to the <a> element
                                    aElemImageLink.appendChild(aElemTN);
                                    aElemUpLink.appendChild(aElemTNUp);
                                    aElemDownLink.appendChild(aElemTNDown);

                                    //Append the new link to the existing <div>
                                    dynDiv.appendChild(aElemImageLink);
                                    dynDiv.appendChild(aElemUpLink);
                                    dynDiv.appendChild(aElemDownLink);


                                    lbl.id = "lbl" + imageID;
                                    var aElemTNTag = document.createTextNode('    Taggar          ');
                                    var aElemTNWantsToshare = document.createTextNode('    Dela?         ');

                                    var txtTag = document.createElement("input");
                                    txtTag.id = "txt" + imageID;
                                    txtTag.setAttribute('name', 'Tag');
                                    dynDiv.appendChild(lbl);
                                    dynDiv.appendChild(aElemTNTag);
                                    dynDiv.appendChild(txtTag);
                                    dynDiv.appendChild(chk);
                                    dynDiv.appendChild(aElemTNWantsToshare);
                                    dynDiv.appendChild(input);

                                    //Appending Dynamic DIV with Parent DIV
                                    var parentDiv = document.getElementById("dvDisplayImageParent");
                                    parentDiv.appendChild(dynDiv);`
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T19:20:47+00:00Added an answer on May 22, 2026 at 7:20 pm

    I Got one alternative :-

    string NoOfImages = Convert.ToString(Request.Form["Your Control Name Which You Want To Access"]);
    

    Now, using Request.Form[] use can get the value’s present inside the CONTROL Created using JAVASCRIPT.

    But still waiting for a better solution.

    > Help Continues…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.