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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
AkshayPosted Nov 27, 2014, 6:26 AM
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);
}
Manish Kumar ChoudharyPosted Nov 27, 2014, 6:24 AM
can u show ur code ?
AkshayPosted Nov 27, 2014, 6:20 AM
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 ChoudharyPosted Nov 27, 2014, 12:13 AM
http://www.ashokraja.me/articles/How-to-create-a-custom-property-and-set-a-default-value-in-a-SharePoint-2013-Visual-WebPart
AkshayPosted Nov 27, 2014, 12:09 AM
Manish Kumar ChoudharyPosted Nov 26, 2014, 11:53 PM
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