.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Using the DVWP to display a one-question survey (like a 'poll')

Posted By:      Posted Date: October 25, 2010    Points: 0   Category :SharePoint

Hey all,

I'm trying to follow this guide for 2010 -> http://www.endusersharepoint.com/2010/04/22/create-a-polling-web-part-with-sharepoint-designer-and-the-dvwp/comment-page-1/#comment-108532 - but i can't get the designer stage working, i'm assuming it's a 2010 idiosyncracy

I only want to deploy my final solution as code, to that end can anyone point me in the right direction for how to create this web part in my solution? (In an event receiver perhaps?) and how to display the one question?

Many thanks,


View Complete Post

More Related Resource Links

Sharepoint Survey Question

I am making a single question survey to vote on a list a videos in a document library.  Is there a way to make the options links?  I have tried quote a few things including hard coding the link (it just displays it all as text) and trying to lookup from a links list but the URL column is not availabe.  I'm open to suggestions but don't really want to do any complex mods in sharepoint. 

SharePoint 2007 - Survey list - Getting user's Windows account ID from a web service using display

Surveys...grrrr.   I am developing a .NET console application that accesses survey data from a single survey list using the MOSS web service "Lists".   I am able to enumerate the survey list and get to the items except for the author of the survey response.  When I get to the column ows_Author, it appears to be a lookup value formatted like this:  "1066;#JOHN DOE".   How can I, using web services alone, lookup the corresponding Windows login ID of that user?  If I go to the survey in SharePoint and click on the name in the view, it takes me to a site-based user profile page that does show the account ID I want.  The page that displays appears to be a virtualized page like this "_layouts/userdisp.aspx?ID=1066".   What I really need is JOHN DOE's account ID like "domain\id". Can I get to this with the data I have available? Thanks

Replacing a text question in a Survey using JavaScript at runtime (document.body.innerHTML.replace)

Hi, I want to replace some of the text in a SharePoint Survey at runtime.  The idea behind that is to add a "header" or "title" to questions that are related together.  For example, let's say I have 2 related questions, a page separator, and 2 more related questions: (yes/no type of questions): Q1.  Are you between 20 and 40? Q2.  Did you went to college?   --page separator-- Q3.  J2EE Q4.  C/C++ The result on the final Survey should look like this: Tell us about you. Are you between 20 and 40?  Did you went to college?   --page separator-- Indicate what programming languages you know: J2EE C/C++ Simply, I tried to use the document.body.innerHTML.replace() in order to replace:  - Q1 with: <h2>Tell us about you.</h2>  - Q2 with ''  - Q3 with: <h2>Indicate what programming languages you know:</h2>  - Q4 with: '' Using the technique below, I added the following code in SharePoint Designer in NewForm.aspx: <asp:Content ContentPlaceHolderId="PlaceHolderTitleAreaClass" runat="server"> <script id="onetidPageTitleAreaFrameScript"> document.getElementById("onetidPageTitleAreaFrame").className="ms-areaseparator"; document.body.innerHTML = document.body.innerHTML.replace(/Q1/g,'

What Survey "Question and Type" would you use with:



In a SP Survey, I need a question like:






Where the user can type in a value for both Vendor and Course fields.
I was thinking to use a "Multiple lines of text" field and change its default value using SP Designer.  Perhaps somebody has a better -or more elegant- way to do it?


Survey ListView Web Part - For One Question Surveys


Hey all,


I want to create a really simple ListView Web Part for one question surveys, all it does is show the question and the user can answer it. After being answered the web part should show results.

This is similar to the current listview web part rendering apart from the Listviewwebpart starts with a 'summary' screen which i hate, the user has to click 'respond to survey' before they can proceed and i'd really just like the question on the page

Has anyone got any idea how I can achieve this without framing the URL that the respond to survey links the user to?

Many thanks,


SharePoint Usage Reporting Quick Poll Question


I've got a very quick poll question for any DBAs out there who utilize SharePoint Usage Reporting.


Would you rather view your SP Usage Reports inside SharePoint itself, or have them emailed to you once per day/week/month in a PDF or Office formats?

Displaying a one-question survey in a web part


Hey all,

I'm trying to display a one-question survey in a web part. I don't want to ever have to use designer when my site's deployed though, I want it to simply display the latest one-question survey, in a web part. So the user creates a survey, and the web part changes automatically - ideally it would show the first question but I could live with the 'standard' survey view with a 'respond to survey' link, even though it's a bit fugly

I've just had a big chat about this here: http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/14380447-c13f-4365-8423-554595c4b726

The web part resulting from that discussion seems really tailored to the one list and as a result doesn't meet my needs :-(

Any thoughts? Cookies up for grabs :-)

Document Library - possible insert survey or poll


Currently using WSS3 and Sharepoint Designer 2007.
Example - Different folders were created under Document Library for different function dept such as HR, Finance etc.
I was thinking whether it is possible to have survey or poll store in these document folders?


GridView inline Master/Detail record display

This code drop is part of a smash and grab series. If you're in a rush, you can just grab this code and insert it into your application, no understanding is required. When you have some time (ya, right) you may want to review the source code.

Display data in gridview dynamicallay

I have AD domain which has 100000 users, I want to display all the users in gridview controls.Actually it is displaying users in gridview after parsing entire domain which takes around 30 min. I want to display the users while loading itself.It is continously getting user information from AD domain and getting each user details, I want to display the users information which already queried instead of waiting till getting all users information

asp.net display data in gridview

i want to display data in gridview binded to a sql datasource
but the problem part is i want to bind a field of that datasource to a dropdownlist and when a item is selected in that dropdownlist then correcposnding to that data will be displayed in gridview...

display data into GridView from excel sheet

I have to display data from excel sheet into my gridview and also I need to figure out a way to store data into excel files from my web page. I am using C# 3.5, VS 2008.

Display Related Data in an ASP.NET GridView

Typically when you display a datagrid you will want to show data from a related table. There are 3 different ways to accomplish this with NetTiers. You can use a custom stored procedure, deepload functionality from the code behind, or a strongly typed datasource control. We'll provide an example of each

Store and Display Images from MS Access Database Using C#

There is only the difference of coding syntax to stream the binary data of image content type to upload it into MS Access Database using C#/VB in ASP.Net 2.0

Namespaces required:-
using System.Data.OleDb;

OleDb is used to connect the web site forms with MS Access Database using Microsoft.Jet.OLEDB.4.0

Some basic MVC question

  1. In regular asp net I can run (debug) the application but I can either "view in browser" that gives me the option to view the application and write code on same time.

In MVC I can't find this option.

  1. What is the basic DATA MODEL for working with SQL DB.

I mean with no any framework (entity framework, Sub sonic, Link to SQL etc')

I look for basic application that works with data but with no fw.

  1. What is the popular DB framework that working with data.
  2.  I am looking on  mvc series


C# Soup To Nuts  (the best series ever)


I watch some of the MVC video, seems that the music store is good but I have to wait to the other part.

Does any one know and recommend   a Microsoft MVC tutorial?





divs do not display side by side


I have two divs. I want them to display side by side, on the same row. Using display:inline-block I can do that. But as soon as I position some text in the bottom right corner of div1, the two divs do not have the same vertical position. They are side by side, but the 2nd div starts at the vertical position of the positioned text in the 1st div.   Why would it do that?  Both Chrome and IE8 render it the same way.

( I am doing the nesting of the divs on the left side so that I can position absolutely within a div and not the page. I can't get text to position in the lower right corner of a div any other way. )


  <div style="border:2px solid black;">
    <div style="display:inline-block;">
      <div style="width:10em; height:4em; background:orange;color:White;
        <span style="position:absolute;bottom:0px;right:0px;">
        login message

    <div s

Web Site to Web Application Question


I've been building web sites and for my next project I will be creating a web application.  I use a 'BasePage' class in all my projects but, since web applications do not contain the 'App_Code' folder, what is the best place/practice for the 'BasePage' class?



ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend