Monthly Archives: September 2011

Add to cart link in WebGrid column changes the URLs of the sorting columns MVC 3 (Webgird sort problem sort url changed after postback)


  When I added a add to cart link inside a webgrid and clicked on it using ajax, it would also change the action and route value of the sorting links in the table header of the WebGrid so when … Continue reading

Posted in MVC 3.0 | Leave a comment

Using JSon to fire an action/method in an MVC controller and get data back – MVC 3.0


  To fire a method in an MVC controller simple create this test method inside your controller class. and to get the data in your *.cshtml/view file add this code below <button onclick=”javascript:GetMyName()”>Show my name</button> <script language=”javascript”>    function GetMyName() {        … Continue reading

Posted in MVC 3.0 | Leave a comment