0

I am retrieving two arguments in commandArgument att, but both of them are GUID type, and it gives error, can I cast guid to string type in Eval"

<asp:LinkButton ID="btnEditCompanyProfile" CommandName = "Edit" CommandArgument='<%#Eval("CompanyProfileGUID") + "#" + Eval("DeploymentGUID")%>' class="Edit-icon" ToolTip="<%$ Resources:strings, UI_ToolTip_Edit %>" runat="server" ></asp:LinkButton> 
1
  • Direct cast is incorrect. However, ToString() method should do what you want. Commented Jun 27, 2013 at 12:04

1 Answer 1

2

You can.

Eval(...) 

is returning object. So I would try

CommandArgument='<%# string.Format("{0}#{1}", Eval("CompanyProfileGUID"), Eval("DeploymentGUID")) %>' 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.