DEV Community

Tummala Krishna Kishore
Tummala Krishna Kishore

Posted on • Edited on

2 2

Pass multiple Eval field in one command argument in Repeater Control

This is the most common problem that generally users face while dealing with Repeater control. I gave this solution in Stackoverflow. want to post it here for users coming from search

Add the below snippet in in template

CommandArgument='<%#Eval("ScrapId")+","+ Eval("UserId")%>'
Enter fullscreen mode Exit fullscreen mode

In code behind you can use retrieve values like this

protected void GridViews_RowCommand(object sender, GridViewCommandEventArgs e)
{
    if (e.CommandName == "Comment")
    {
        string[] commandArgs = e.CommandArgument.ToString().Split(new char[] { ',' });
        string scrapid = commandArgs[0];
        string uid = commandArgs[1];
    }
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more