I have deployed an ASP.NET control in a wsp package. I would like to add some custom JavaScript and HTML to the .ascx file. Nothing that would need a recompile and re-deploy.

Where is the actual markup located in SharePoint 2010 so I can edit without redeploy?

  • I feel like this would be a security concern... – RJ Cuthbertson Oct 18 '12 at 18:07
  • why are u reluctant to deloy again with corrections? – Abhijit Oct 18 '12 at 18:11
  • if you do this, don't be surprised when bad things happen. maybe sooner, maybe later. Best to just re-deploy the wsp. – Derek Gusoff Oct 19 '12 at 0:59

You would be able to find the ASCX file in 14 root. typically .. C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES

copy the JS files to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033

Update the ASCX file with reference to JS from "_layouts/1033/" folder like the line below.

<script type="text/javascript" src="_layouts/1033/xyz.min.js"></script>
  • 1
    Whilst this answer is correct (in terms of file location), it's certainly not the 'right' thing to do - the reason for using wsp to deploy this is that it will ensure that all the servers in the farm are updated correctly and are in sync. Which is very important in a product that's farm based... – marcus.greasly Oct 19 '12 at 6:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.