Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have created a custom feature for adding a button in the SharePoint 2010 ribbon. If I click that button, I can open a show model dialog box which I have loaded a aspx file that contains file upload control and buttons. This thing works well on my machine.

When I deploy the solution to another machine, I can see the custom ribbon button. If I click it, I can get the aspx file but I get a file not found error. I have added javascript for the button coding

(ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please');", true);

Can anyone guide me?

share|improve this question
add comment

2 Answers 2

When you're working with the SharePoint Ribbon, you have to always clear your browser cache. Otherwise modifications might not be visible in your browser. In this case, you might have changed a working solution on your development machine. It still works there, because the old version gets loaded from the cache. The other machine gets the current version, which might not work. So try deleting your browser cache on your development machine and see if you get the same error. Then you have something to start with.

share|improve this answer
    
Hi Robert,Thanks for the update . I have used 2 buttons in the aspx page one button contain code for cancel and other contain code which show alert box . I did this by adding this code (ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please');", true); Is there any necessary to add any jscript file in other machine which show this issue. –  ahamedzakeer Jul 21 '11 at 4:02
    
Could you clarify your scenario a little more? How do you deploy your ribbon customizations? Where do you get your file not found error? –  Robert Jul 21 '11 at 12:31
add comment

As a starting point.. You can check with Fiddler tool which URL resource returned Page not found and rectify it.

share|improve this answer
    
Thanks Ashish, My Requirement is when i add a script inside the button it get this error and i am using this script inside my button (ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Please');", true); So is that i need to add any JavaScript file to the other machine which show the issue. –  ahamedzakeer Jul 21 '11 at 4:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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