Click here to Skip to main content
15,888,968 members
Home / Discussions / Web Development
   

Web Development

 
QuestionJavaScript - Help Me Understand Pin
Kevin Marois28-Feb-17 7:54
professionalKevin Marois28-Feb-17 7:54 
AnswerRe: JavaScript - Help Me Understand Pin
Nathan Minier28-Feb-17 9:38
professionalNathan Minier28-Feb-17 9:38 
GeneralRe: JavaScript - Help Me Understand Pin
Kevin Marois28-Feb-17 10:45
professionalKevin Marois28-Feb-17 10:45 
GeneralRe: JavaScript - Help Me Understand Pin
Nathan Minier1-Mar-17 0:58
professionalNathan Minier1-Mar-17 0:58 
QuestionSchemas Pin
Member 1302472026-Feb-17 5:53
professionalMember 1302472026-Feb-17 5:53 
AnswerRe: Schemas Pin
BrunoFaitalaas6-Mar-17 0:17
BrunoFaitalaas6-Mar-17 0:17 
AnswerRe: Schemas Pin
camillebo16-Jun-17 13:35
camillebo16-Jun-17 13:35 
QuestionMVC Refresh A Grid Pin
Kevin Marois22-Feb-17 10:51
professionalKevin Marois22-Feb-17 10:51 
I'm very new to web development, so forgive my ignorance...

I've got a grid on a page, and it loads fine on startup. I then receive an event from a SignalR service. I want to reload the grid at this point. Here's my controller:
public class HomeController : Controller
{
    private IDataAccess _dal;
    private DashboardClientProxy _dashboardProxy;
    private bool _isConnected = false;

    public HomeController()
    {
        _dal = new DataAccess();
        _dashboardProxy = new DashboardClientProxy();
        _dashboardProxy.ResultsAdded += _dashboardProxy_ResultsAdded;

        try
        {
            _dashboardProxy.Connect();
        }
        catch (Exception e)
        {
            throw e;
        }
    }

    public ActionResult Index()
    {
        var data = _dal.GetDashboardInfos(new DashboardInfoQueryArgs());

        return View(data);
    }

    private void _dashboardProxy_ResultsAdded(object sender, EventArgs data)
    {
        RedirectToAction("Index", "HomeController");
    }
}

I thought that by calling "RedirectToAction("Index", "HomeController") that the Index method would be run again, yet it doesn't work.

What am I doing wrong here?

Thanks
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: MVC Refresh A Grid Pin
Richard Deeming23-Feb-17 4:04
mveRichard Deeming23-Feb-17 4:04 
QuestionMVCGrid.Net Column Width Pin
Kevin Marois21-Feb-17 13:31
professionalKevin Marois21-Feb-17 13:31 
QuestionRe: MVCGrid.Net Column Width Pin
Richard MacCutchan21-Feb-17 22:10
mveRichard MacCutchan21-Feb-17 22:10 
QuestionWebsite Build Help!! Please Pin
Member 1300832617-Feb-17 15:22
Member 1300832617-Feb-17 15:22 
AnswerRe: Website Build Help!! Please Pin
Afzaal Ahmad Zeeshan17-Feb-17 21:09
professionalAfzaal Ahmad Zeeshan17-Feb-17 21:09 
SuggestionRe: Website Build Help!! Please Pin
Richard Deeming18-Feb-17 1:22
mveRichard Deeming18-Feb-17 1:22 
QuestionAngular JS code Not work Pin
Member 1300557216-Feb-17 4:44
Member 1300557216-Feb-17 4:44 
AnswerRe: Angular JS code Not work Pin
Richard MacCutchan16-Feb-17 5:37
mveRichard MacCutchan16-Feb-17 5:37 
GeneralRe: Angular JS code Not work Pin
Nathan Minier16-Feb-17 6:33
professionalNathan Minier16-Feb-17 6:33 
GeneralRe: Angular JS code Not work Pin
Richard MacCutchan16-Feb-17 7:45
mveRichard MacCutchan16-Feb-17 7:45 
QuestionMvc Discussion forum Pin
pankajkrgupta24-Jan-17 18:51
pankajkrgupta24-Jan-17 18:51 
AnswerRe: Mvc Discussion forum Pin
Richard MacCutchan24-Jan-17 22:35
mveRichard MacCutchan24-Jan-17 22:35 
AnswerRe: Mvc Discussion forum Pin
ZurdoDev25-Jan-17 0:46
professionalZurdoDev25-Jan-17 0:46 
QuestionHow Do I Place Google Translate Correctly Pin
xiecsuk19-Jan-17 6:58
xiecsuk19-Jan-17 6:58 
AnswerRe: How Do I Place Google Translate Correctly Pin
Sushil viper 19-Jan-17 8:38
Sushil viper 19-Jan-17 8:38 
GeneralRe: How Do I Place Google Translate Correctly Pin
xiecsuk19-Jan-17 22:35
xiecsuk19-Jan-17 22:35 
GeneralRe: How Do I Place Google Translate Correctly Pin
Sushil viper 19-Jan-17 22:46
Sushil viper 19-Jan-17 22:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.