1

I want to build a wrapper web part which will have properties. These properties must be consumed by jQuery functions and support its consumer webpart. Can we do this?

2

jQuery runs entirely client side, so it can consume anything which ends up in the markup of the page. It doesn't matter what you add to properties on the development side if those properties aren't available in the page client side.

Keep in mind that you can also use jQuery's AJAX function to query SharePoint's Web Services or read any URL-accessible file, though I don't think that helps you here.

4
  • thanks buddy, In fact i don't want to use webservice for now. can we do this then? say i have created wrapper webpart which having the properties. in each property i added a inline jquery functions as per our requirement. and i register jquery on client side using ClientResgistredScript object. so would that works ? I want something like this jquerywebparts.codeplex.com
    – Red Swan
    Jul 5 '11 at 9:13
  • It sounds like what you're describing would work. I'd give it a go. Jul 5 '11 at 14:01
  • Thanks again, but i gone through few url's where author suggested to add the reference of jquery file in the master page. but in this (which i given in my last comment)...the reference of .js files added in the Assembly.config file using attribute. i could not get the difference between both. is i need to do any one out of these both ways?
    – Red Swan
    Jul 6 '11 at 4:58
  • I'm not sure I understand your last question, but I almost always simply put the jQuery reference in my master page using a plain old <script> tag. There are multiple ways to accomplish this, and your deployment methods should have more of an impact tha others' opinions. Jul 7 '11 at 3:28

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.