I want to Create Custom Polling Web Part Please help me...!!
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 26, 2014, 6:53 PM EST
Hi Akki,
Go through these links you might got your answer
https://www.nothingbutsharepoint.com/sites/eusp/pages/create-a-polling-web-part-with-sharepoint-designer-and-the-dvwp.aspx
http://www.amrein.com/apps/page.asp?Q=5755
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 26, 2014, 7:13 PM EST
http://www.ashokraja.me/articles/How-to-create-a-custom-property-and-set-a-default-value-in-a-SharePoint-2013-Visual-WebPart
Akshay82 reputationPosted Nov 26, 2014, 7:09 PM EST
Akshay82 reputationPosted Nov 27, 2014, 1:20 AM EST
i am trying to bind that list in webpart using html ,
but that list contain only 1 coumn
it contain question
radiobutton yes no
now i use field of that column to bind
but it shows only yes
it not showing question
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Nov 27, 2014, 1:24 AM EST
can u show ur code ?
Akshay82 reputationPosted Nov 27, 2014, 1:26 AM EST
My code
using (SPSite site = new SPSite(SPContext.Current.Web.Url))
{
using (SPWeb web = site.OpenWeb())
{
SPList list = web.Lists["Take a Poll"];
SPListItem item = list.AddItem();
SPListItemCollection collitem = list.Items;
HtmlGenericControl div = new HtmlGenericControl("");
foreach (SPListItem oitem in collitem)
{
string question = oitem["Are_x0020_you_x0020_satisfied_x0"].ToString();
string v = new SPFieldUserValue(web, oitem["Author"].ToString()).User.ToString();
div.InnerHtml = question;
this.Controls.Add(div);
}