Fixing several Instances of the Same Web Part to a Web Part Page?

  • Fixing several Instances of the Same Web Part to a Web Part Page? Alex

    My problem precisely and concisely is that I developed a simple web part to display OOTB Surveys on the page (Which means user can answer and submit the survey through my web part). It works correctly.

    BUT when I add the web part two times, then, User will not be able to submit any of them. Simply because when s/he answer the first survey and click Submit-Button, the required field validation will fire on the other web part and requesting to be filled.

    Scenario: (I hope those steps give you better understanding of my case)

    1- Assume that I add my SurveyViewer web part to display Voting on the right side of the page. Also, I added again my SurveyViewer web part to display Quiz.

    2- The user opened the page and s/he only wants to Vote, So s/he selects and clicks Vote.

    3- Nothing gets submitted and the Page will display “Please fill the fields of Quiz”.

    Question: How can I submit the Voting without being affected by other instances?

    Thank you, and I would greatly appreciate your inputs!

  • There are various issues which could be at play here, but essentially you can solve your validation issue by ensuring that the ValidationGroup property of your validation controls is unique to a given instance of your webpart (maybe prefix it with the ClientID property.)

    You will need to ensure that your sumbit button is set to not cause validation explicitly and then ensure that when it is clicked you call Validate() and pass in the name of your validation group.

    This should fix this issue but not other issues related to multiple instances.

Related questions and answers
  • and clicking the "Next" button, they receive an Access Denied error. Thinking that the branching may have been causing an issue, I removed it. The users can now see the whole survey at one time, but when they try to submit their answers they still received the Access Denied error. I have tried sending an access request from a test user (as prompted by the error page), but I still received the same error... possible. Can anyone tell me what I may have misconfigured or need to change? Update I've worked with the problem a little more. If I just create a survey with one question using only a yes

  • part NOT a page. Also, it is not possible to oblige the clients to change their forms from POST to GET just to use my little web part (I think you understand me). I put a breakpoint inside the web... the web page (Which has my web part) whenever user clicks on BACK or FORWARD ? ...My problem precisely and concisely is that I developed a web part which contains a FileUpload control and the web part in general works correctly except for one issue. Whenever I use the web part

  • When you activate Group Work Lists feature in a site you get the resources list and a few other lists. If you had the resources list to a page then you can see the list and you have to add each resource list to the page using the resources link. What I would like to do is have the resources already included on the page when a user visits the site. So if I have 3 Digital cameras, you can see the bookings for those cameras by defualt without having to add each one as a resource. Does anyone know how to do this? Does that clarify the situation any better? I will try and add screenshots

  • I have a publishing SharePoint site set up that allows self-provisioning accounts. I'm using ADMembershipProvider, along with the LdapRoleProvider. When user's create an account, they are automatically added to a default AD group, which is already added to the built in Visitors SharePoint group. So once the user creates an account and logs in, he/she has access to the landing page. We have some web parts that we set up to display only to certain user's in AD groups. With this, we chose to use audiences. After entering the AD group in the audience for the web part, it does not display even

  • Module: I think this is the most likely path forward, however it seems to always want to provision a file to the site. For example, if I want to add a web part to the home page (default.aspx), then there doesn't seem to be a way to just get a reference to the page, it always wants to overwrite it with a new file. But I dont want to do that, I just want to add a Web Part to the existing page. See my..., and then as part of that activation, drop web parts onto some specific pages. In my case I want to be able to drop it onto the "AllItems.aspx" page of a list, but I'm equally having trouble adding

  • ); System.Console.WriteLine(meta.Title); } } } As you can see, I fetch all the lists using GetListCollection and then, if it is a survey, I try to get the List... because my code had fetched the GUID of the list just milliseconds earlier! Can anyone explain what is going on here? I had the same problem yesterday and at some point it just went away. Unfortunately it came back this morning. UPDATE As I was writing the question I had an idea. I visited the survey overview page and tried the webservice again. It worked!! Going to the list of surveys page

  • View WebParts, the connection is greyed out. How do I make this work? There is very little information available on connecting WebParts on a web part page. This seems to be too advanced a topic for most of the end user resources. On the other hand, it's not a developer or IT Pro topic either. The Administrator's Companion and the "SharePoint 2007 User's Guide" by Seth Bates both have one page on the topic. Office Online, Connect Web Parts, is not complete. Update 1/29/2010: Rereading my question and Brian's answer, I've given him the credit. This question really has two parts and he did

  • ["Doc"]; view.ListId = list.ID.ToString(); view.ViewId = list.Views["ReadListByCategory"].ID.ToString(); Controls.Add(view); } After adding web part on page i got error: !--Unable to display web part--. There is no problem with other sharepoint lists. Only with external list. Does anyone have experience in creating Web Part with External list in it? ...Using VS 2010 i've created BCS model for external MS SQL source, deployed it with success, then created external list - it works perfect. Now my task is - create visual web part in VS2010 and place

  • I am wanting to access survey information via the Lists web service and display the questions contained in the survey. The result contains a large number of Field nodes some of which are the questions in the survey. The other fields contain other information such as author, last changed etc. How can I pick out the questions? I had thought that all non-questions would be hidden but this is not the case. Here is my code as it is at the moment. It returns about 16 items. The survey has 6 questions... // read question definitions string[] HandleTypes = new string[] { "Number", "DateTime

Data information