Poll Widget For BlogEngine.Net

Download BlogEngine.Net2.0 WAP With Poll(5.46 mb)

Download Poll Widget Only (21.54 kb)

I have been thinking of adding some sort of Poll widget or control to Blogengine.Net for quite some time. Latey I ran into BlogEngine.NET 2.0 Poll Widget implementation. This looked like what I really needed. When I tried to integrate it into my BlogEngine.Net WAP model project, I ran into few issues.

First there was use of a property from BlogEngine core that did not exist in latest code base. That was not such a big deal because I just need to use a different property. The biggest issue I ran into was that the implementation was missing a very important aspect of poll answers. There was no definite way to specify order in which answers should be displayed. You could not simply say that how about sorting alhphabateically. Well, lot of times in polls the answers are places strategically and they can not be simply sorted alhpabattically. Following image shows a sample poll that I created. In this I want to show Other answer as last answer in the list but I could not do it it because.

blogengine poll

So I decided to moidy the implmentation to include additional field in the database Poisition for the answer. And when I got list of answers from database, I sort the list on this field. And that solved the whole issue with position specification. To accomplish that I modified poll editor interface as well so that I could move the answers up and down as needed. You can see from the following image modified editor interface.

blogengine poll widget editor

The end result is that I have modified polling widget that displays the answers as per position specified at design time. Following image shows the final poll widget user interface. As you can see that Other is the last answer in the list and not some alhphabetically sorted answer list.

blogengine poll ordered answers

Updated BlogEngine WAP Project

I have updated my conversion of BlogEngine2.0 WAP to include Poll widget in it. You can download the whole nine yards. I have also provided just the bare minimum you will need to include Poll widget in your WAP model of BlogEngine2.0.

Installation and Other Instructions

For more details about set up, theme, CSS etc. I will recommend looking at BlogEngine.NET 2.0 Poll Widget post.

comments powered by Disqus




5.0 °C / 41.0 °F

weather conditions Clear

Monthly Posts

Blog Tags