First post on the board, hopefully someone is able to help me out here
So I am doing a site in VB.net… sort of a learning experience as I have never really done .net before… and I have come upon an odd problem. I am no stranger to web programming (mostly php) but am pretty new to asp.net… Here’s the scenario:
I have one main page, 3 different types of users. Depending on which type of user is logged in, the page will display different options. Sounds simple.
Currently, I have the results displayed using a repeater control. My table should basically look like this:
Name … Address … DateModified … CONTACT … EDIT … DELETE
Obviously, regular users should see “name”, “address”, “datemodified”, and “contact”, but not “edit” or “delete”.
Administrator users should see all links, including “edit” and “delete”. For example, the links may point to “delete.aspx?id=14” or “edit.aspx?id=14”, where 14 is the ID field in the database.
This works fine and dandy when I need the links to display for *all* users, (that is, when the item template is just hardcoded), but I have yet to find a way to change the item template to display the “privelaged” links depending on who is logged in.
I thought that it would be possible to use another type of control inside of the repeater, but it turns out that it is not an option… (dang)
Should I just scrap the repeater control and take a different approach, or is there a simple way to do this? I’m still used to the php-style spaghetti-code approach, and this added level of abstraction is killing me
Thanks ahead of time for any sort of direction on this one.