0

I'm tring tyUrl.Action to need to pass multiple parameters to

I need to load dialog box with multiple parameters with url.action. How can I do that? I tried few ways but nothing worked:

diag.load('@Url.Action("Action", "Controller", new {para1=val,para2=val2})', '', function () {
}

Need less to mention, all values would be dynamic.

Ram
  • 143,282
  • 16
  • 168
  • 197
user1480864
  • 1,455
  • 3
  • 16
  • 23

1 Answers1

0

Yep, that should work. It does however rely on the fact that you have that controller action's route set-up with para1 and para2 specifically. It needs to know how to build up the url from these bits, so it uses the routing table.

GeekyMonkey
  • 12,478
  • 6
  • 33
  • 39