.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

Survey ListView Web Part - For One Question Surveys

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

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,


View Complete Post

More Related Resource Links

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 :-)

WPF Tutorial - Using The ListView, Part 1

Many of the controls in WPF have a downright dizzying array of capabilities and features, due in large part to the composibility of all the components. The ListView control is a great example of this - the possibilities are almost endless. This series of tutorials on the ListView will hopefully make the space of possible options seem not quite as daunting

Web Part Namespace & Deployment Question



I have a web part deployment and development question. Probably newbie questions..

For web parts which will only be used in certain web applications, I can definitely see creating custom CAS policies etc.. and deploying the dll only to the Bin of the Web Application, but what is the best practice for deploying a Farm wide web part that everyone will use?

I assume it goes in the GAC, and additionally, are there any best practices as far as the namespaces for web parts when they are going into the GAC?

For example, if I go into the Assembly folder and look at all the assemblies in the GAC, is it "okay" to have various globally deployed web part assemblies in there? Like, "MyCustomWebPart" sitting in there with the other sharepoint assemblies? Seems messy to me, but if these are "one-off" web parts that won't have a bunch of classes within a single namespace, it seems like what needs to be done.

Hopefully that was clear enough!

A layout, mouse selection, ListView problem/question

I'm having a problem with a particular layout scenario, and how it interacts with a left mouse click in certain situations. I have 3 rows in a Grid.  The first is a ListView (Master), with the Row Height set to '*'. It's ItemSource is bound to a collection in a ViewModel, and its SelectedItem is bound to a value in the ViewModel.  When the SelectedItem is null, it should take up its entire container (the other 2 rows are invisible). The second row is the GridSplitter.  It's visibility is bound to a value in the ViewModel.  It's only visible when the SelectedItem in the Master ListView is not null.  It's GridRow height is set to Auto, and it's height is explicitly set to 5 (via a style). The third row is a sub-ListView that shows Detail data for the Master SelectedItem in the top ListView.  It's GridRow Height is set to zero by default, and if an item is selected in the Master ListView, it should become visible and have a set height (400 to start, via a binding on the Height of the row). The desired effect is that when an item is selected in the Master ListView, the Detail ListView becomes visible and the GridSplitter allows you to resize the top and bottom as needed.  If necessary, the ScrollBars become visible in the Master ListView to show any items that are now obscured by the Detail ListView (via the automatic scrolling featur

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. 

Customizing the display for a ListView Web Part

I want to customize the display of a ListView Web Part. I tried following this [http://msdn.microsoft.com/en-us/library/ff604024.aspx] article, but I'm not having any success. Has anyone done something like this before? I need a very simple and basic view from which I can build upon. Like displaying only the Title field of a list without the column headers and other stuff. 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,'

How to select some part of a text in listview item?


Dear all

I have a listview in WPF application, that I bind data in it using gridview. now I want to make a search for it. making search is simple but question is this I want to make a search that if user type 'a' then system will highlight all 'a' in list view. or if user type 'lis' the system will highlight all 'lis' in that listview.

Is it possible to highlight part of the text in side of listview item? or I have to select whole listviewitme? 


Thank you so much

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?


AccessDataSource and Listview control question



Let me try to explain what I want to do:

I want to display an post using a Listview control connected to a AccessDataSource, and I display one post at a time.

But each post has comments, so I want to display the comments of each post on the bottom of the page using other Listview control.

I'm not sure how to do this... do I need a new AccessDataSource control to get the comments, if that's so, how do I synchronize  the two AccessDataSource's so they use the same post ID ... or am I doing this wrong?

Any idea ? Undecided


Sharepoint chart web part question



I'm playing with Sharepoint Enterprise 2010 chart web parts, and am having problems producing a roll-up chart. In particular, I have a Sharepoint list of the form:

6/20/2010, Apple
6/25/2010, Banana
7/1/2010, Apple
7/2/2010, Grape
7/5/2010, Banana

I'd like to produce a bar chart where the X axis contains the category (Apple, Banana), and the Y axis contains a count of the number of occurrences in the list. Is that possible with the built-in chart web part, or do I need to go to a third-party product? After playing with it for quite some time (and browsing the web), it doesn't appear possible.



Page Viewer Web Part question


Dear collegs ,

I have one question and hope that you can help me.

Namely, I added one Page Viewer Web Part to one SharePoint web page. Before that on my IIS I created one local web site with this link : http://localhost/Test/Home.html.

Inside my Page Viewer Web Part first I chosee Web Page and than in field Link enter link from my IIS : http://localhost/Test/Home.html.

When I open that SharePoint page than inside SharePoint I got http://localhost/Test/Home.html what is good.

That IIS web site have more pages, for example page Customer1 with the link http://localhost/Test/Home/Customer1.html.

What I would like to ask you, is possible from outside to open Page Customer 1 (http://localhost/Test/Home/Customer1.html ) inside Page Viewer Web Part without that must first open http://localhost/Test/Home/Customer1.html.

Other words, when click on some link to open directly Customer1 web page inside above created Page Viewer Web Part.



listview web part with more announcements option



i want to create a list view web part with custom view .When i tried this, i cant able to see "More Announcements " option


How can i provide "more Announcements" option to user?


Thanks and Regards,

Vinay Kumar

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


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,


WSS3.0 - Survey Web Part Graphical Summary Width


Good morning,

I am currently exploring the use of Sharepoint 3.0 in our environment and have been running through the evaluation guide.  I created a Survey and added the web part to the right side of the main page using the Graphical Summary view.  The column width appears to hold firm at 375pt and the adjustment through modifying the Web Part doesn't have any effect.  How can I go about narrowing this web part so that it lines up with the rest of my right side content?  Any help is most appreciated.

Thank you,

WPF: If Heineken did MVVM Frameworks Part 4

MVVM is to have an instance of a particular Model (say currentPerson) inside my ViewModel (say PeopleViewModel) which is exposed to the View (say PeopleView). The View binds and edits the Model directly.

This definitely flies in the face of what most people consider to be the holy grail of MVVM pattern, but it's a fairly new pattern, so people are still finding their way with it every day, and this works for me very well. The reason I do what I do, is for the following reasons:

1.I have always had the luxury of being able to write my own UI specific Model classes. I would even do this if I was using some other Model classes first, such as LINQ to SQL or LINQ to Entity Framework. As these classes don't have everything a proper WPF Model class needs in my humble opinion. Though, they are pretty good, as they are Partial classes and use INotifyPropertyChanged/DataContract etc etc
2.I am a pragmatist and I do not like writing code for the sake of writing code. I have seen some MVVM apps where the author has had a Model with 50 properties on it, that are simply repeated in the ViewModel abstraction, where the ViewModel added nothing. On that day I decided I would never do that unless I have to.
3.I honestly see no harm in writing directly to the Model from the View, JUST SO LONG AS if the Model is InValid its data NEVER makes its way to the database. I honestly see no pro

Using ASP.NET 3.5's ListView and DataPager Controls: Displaying Data with the ListView

Prior to ASP.NET 3.5, developers who needed to display a set of records could choose between the GridView, DataList, and Repeater controls. The GridView provides rich data features, but has a very boxy layout; the DataList and Repeater allow for a more flexible layout, but lack the "point and click" data features found in the GridView, DetailsView, and FormView controls. The ListView bridges the gap between layout flexibility and built-in data features.

This article, the first in a series of articles on the ListView and DataPager controls, looks at the ListView's many available templates and illustrates how to display data. Read on to learn more!
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