|
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using DynamicJsonIFrame.Models;
namespace DynamicJsonIFrame.Controllers
{
[HandleError]
public class HomeController : Controller
{
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult Index(){ return View(); }
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult IFrameContainer(string WebURL,
string InformationText)
{
ViewData["WebURL"] = WebURL;
ViewData["InformationText"] = InformationText;
return View();
}
[AcceptVerbs(HttpVerbs.Get)]
public ActionResult IFrameWebLoader(string WebURL)
{
ViewData["WebURL"] = WebURL;
return View();
}
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult GetTabs()
{
List<TabInfo> tabList = new List<TabInfo>();
tabList.Add(new TabInfo
{
TabID = 1,
TabText = "Yahoo",
TabInformationText = "",
TabUrl = "http://www.yahoo.com"
});
tabList.Add(new TabInfo
{
TabID = 2,
TabText = "Hall of fame",
TabInformationText
= "Michael Jordan's hall of fame acceptance speech",
TabUrl = "http://www.youtube.com/watch?v=owbYN3XstVQ"
});
tabList.Add(new TabInfo
{
TabID = 2,
TabText = "Soccer Game",
TabInformationText = "The greatest soccer goal",
TabUrl = "http://www.youtube.com/watch?v=MsAgu45qqWE"
});
tabList.Add(new TabInfo
{
TabID = 2,
TabText = "Cool",
TabInformationText = "Soccer and soccer !",
TabUrl = "http://www.youtube.com/watch?v=X5SwdvUWx0E"
});
return Json(tabList);
}
}
}
|
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 working in the IT industry for some time. It is still exciting and I am still learning. I am a happy and honest person, and I want to be your friend.