locked
How to pass two different ID to URL RRS feed

  • Question

  • User-1557173817 posted

    Hello, please how can i pass  two different IDs from to different tables to URL from webgrid

    Monday, November 23, 2015 3:00 PM

Answers

  • User281315223 posted

    Couldn't you just build the URL as expected (after resolving each of the individual IDs that you need)?

    // Get your IDs
    var id1 = db.QuerySingle("SELECT Column FROM Table WHERE ID = @0, yourId); 
    var id2 = db.QuerySingle("SELECT Column FROM OtherTable WHERE ID = @0, yourId);
    
    // Build your URL using QueryString values
    var url = String.Format("YourBaseUrl?A={0}&B={1}",id1,id2);

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 23, 2015 3:18 PM