Posted on: 5/5/2011 10:57:32 AM | Views : 267

I'm trying to create a forum and i'm stuck with the Edit button which usually appears at the forum posts.
I want the edit button to appear if you are the owner of the forum post, OR a member of certain roles. Because of the former, i can't just simply use the LoginView's Role Groups.
So i was trying to do something like:
<asp:Button ID="btnEdit" runat="server" Text="Edit" OnInit="showEdit" Enabled="False" Visible="False"/>
With the OnInit event i call a method named showEdit, in which i'm setting the Enabled and Visible properties to true if certain conditions are met. However i would need to pass a parameter trough this method call - the ID of the post - from which i can decide if the user is the owner of it and should see the edit button, or not.
 
Problem is, i can't pass any parameters there, because as soon as i start writing the brackets (not just the name of the method) and try passi ...

Go to the complete details ...