Simple ASP.net Role View Control

For a while now I’ve been wishing I didn’t have to do this…

<asp :LoginView ID="LoginView1" runat="server">
  <rolegroups>
    <asp :RoleGroup Roles="Administrator">
      <p>Admins only!</p>
    </asp>
  </rolegroups>
</asp>

…every time I want to have something only an Admin can see. It’s not that it takes long to do, it just seems incredibly inefficient.

So now my first custom control to the rescue, to this point I’ve only used user controls in ASP.net.

using System.Web.Security;
using System.Web.UI.WebControls;

namespace Teknohippy
{
    public class AdminView : PlaceHolder
    {
        public AdminView()
        {

        }

        public override bool Visible
        {
            get
            {
                if (DesignMode)
                {
                    return base.Visible;
                }
                else
                {
                    return base.Visible && Roles.IsUserInRole("Administrator");
                }
            }
            set
            {
                base.Visible = value;
            }
        }
    }
}

Now I can just to the following instead…

 
<tekno:AdminRole id="a1" runat="server">
  <p>Admins Only!</p>
</tekno:AdminRole>

S60 Word Processors and Psion 5mx

I spent some time yesterday checking out which S60 word processor I’d like to use with my E71. I decided in the end that the answer would be, none.

One huge feature that is missing for me in every single one I tried, is styles. I find it really hard to outline a document without some kind of style library. Is it too much to ask to just have a choice of heading 1, 2, 3 and normal?

It’s a step backwards from my existing mobile word processing experience, the Psion 5mx.

Mind you a lot of stuff is a step backwards from the Psion. Okay yes it has some serious faults nowadays.

  • Very unclear screen
  • No easy mobile connectivity
  • No color
  • No decent web experience

But as a word processor for a mobile writer it does many things very well, some that still haven’t been matched.

  • Good keyboard for its size
  • Functional word processor
  • Excellent battery life

Of course correcting lots of the things it does badly would damage the excellent battery life. But still it would be nice if I could have a non-crippled word processor for my E71. Anyone know of one?

Dmitry Fedorov’s Airclick Plugin

Dmitry’s fantastic Multimedia Keyboard plug-in  for Griffin’s Airclick USB has been updated.

It gives you the ability to control any application that supports Multimedia Keyboards by simulating multimedia key or arrow key strokes. You don’t have to change to another plug-in to control different applications, in fact, you might never have to change it again.

Well now it even works with Adobe Flash players in full screen! (YouTube, Hulu, Amazon, JW FLV Player and similar)

You can download Dmitry’s plugin here:

http://www.dimin.net/software/airclick