0

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?

2 Answers 2

1

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.

2
  • 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. Jul 21, 2011 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, 2011 at 12:31
0

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

1
  • 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. Jul 21, 2011 at 4:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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