|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using JqueryController;
using JqueryControlMVC.Models;
namespace JqueryControlMVC.Controllers
{
[HandleError]
public class HomeController : MvcControllerBase
{
private const string UserControlPath="~/Views/UserControl/ViewUserControl1.ascx";
public ActionResult Index()
{
ViewData["Message"] = "Welcome to ASP.NET MVC!";
return View();
}
[HttpPost]
public ActionResult Index(string x)
{
if (this.IsPartialRendering && this.PostParameter.ContainsKey("action"))
{
switch (this.PostParameter["action"])
{
case "refreshTime":
TimeModel t = new TimeModel();
return this.RefreshJQueryPanel<TimeModel>("JqueryController1", UserControlPath, t,"CallBack","parameterToBeReturned" );
break;
//any other action
}
}
return View();
}
public ActionResult About()
{
return View();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have been fascinated by software development since I was 10 years old. I'm proud of learned the first programming language with an Olivetti PC 128S based on Microsoft BASIC. I'm a Software Architect/Senior Developer with a strong background of all the developing Microsoft's technologies.