I'm bashing my head using VB ASP.Net. This stuff is simple in ColdFusioon but I can't find the way to do this anywhere.
I have a gridview called GridView1. In this grid I have a TemplateField:
<asp:LinkButton ID="LinkButton1" Visible="False" CommandArgument='<%# Eval("eadocsID") %>'
OnClientClick='return confirm("Are you sure want to delete this record?")'
Font-Strikeout="False" Font-Bold="True" ForeColor="Green">Delete</asp:LinkButton>
I have set visible to false. On the code behind, I'm trying to say if your cookie contains one of these values, set the Visible property to true:
If Request.Cookies("employee")("employeeid") = "241" Or "146" Or "8" Or "172" Then
GridView1.Visible = True
Obviously, Gridview1.Visible isn't going to work, but I don't know how to reference LinkButton1 as it says it's not defined.