Hey all i have this piece of code here:
<asp:TemplateField>
<ItemTemplate>
<asp:LinkButton CommandArgument='<%#Eval("id") & "|" & Eval("theName")%>' runat="server" Text='<%#Eval("status")%>' CommandName='<%#Eval("status")%>' ID="statusLink" />
</ItemTemplate>
</asp:TemplateField>
And where it says "status" it would either be "REJECTED", "PENDING" or "APPROVED". The problem being is that how can i not have a link if it says APPROVED but have different links for the REJECTED and APPROVED?
I check the clicks this way currently:
Protected Sub grdView_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles grdView.RowCommand
Dim command As String = e.CommandName.ToString
Dim theName() As String = Split(e.CommandArgument.ToString, "|")
Dim cid As String = theName(0)
If cid.Length <= 0 Then Exit Sub
Select Case command
Case "PENDING"
Response.Redirect("/account/Req.aspx?ID=" & cid & "&ACCEPT=yes&NAME=" & theName(1))
Case "REJECTED"
Response.Redirect("/account/Req.aspx?ID=" & cid & "&ACCEPT=no&NAME=" & theName(1))
End Select
End Sub
So if one records was like this:
Bob | Barker | Bob@priceisright.com | PENDING (Approve | Reject)
Then the user would have the choice to either Approve or reject that person by pressing either link.
If it was approved already then it should just look like this:
Bob | Barker | Bob@priceisright.com | Approve!
...without being linked with anything.
Any help would be great!
UPDATE
Maybe a better alternative to this is to just create the asp linkbuttons dynamically. But how would u insert them into the correct spot on the page?