Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










MVC :: PartialView With AutoRefresh


need to keep a list of logged users STATUSES at the Server level (either "ONLINE" or "OFFLINE").

so I wrote a Partial View to maintain the user current Status (Online, Offline). The server stores these values both on the Database and all the current Online users also in a Cached entry so that I can retrieve the list of all current "Online" users from cache.

In order to keep this list uptodate, I now need an asynchronous AutoRefresh call that notifies the server to keep my userID on the ONLINE list. This call should execute every xx seconds and should only execute if the current status is ONLINE.

QUESTIONS: 1) How can I create an AutoRefresh call that fires every XX seconds 2) How can I ensure this call executes only when I'm in ONLINE status


View 2 Replies (Posted: Nov 22, 2010 09:43 PM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
Web Forms :: How To Add Autorefresh
Is it possible to setup an auto refresh code for an Adrotator so that it will refresh the banners without creating a custom user refresh control, if so how would I do that?

Posted: Apr 14, 2010 05:34 PM

View 10 Replies!   View Related
AJAX :: Autorefresh Of Table Or Individual Row / Cell
I've been reading and trying to figure out a way for half a day yesterday, and any solutions seems to fit to this. Overview: My solution is building up xml files from different folders on another server. After the xml is built up, I can run a "File Mapping" which will grab the appropriate information from the a specific xml selected with a dropdown and pass it to the asp:repeater. The binding is done on load, reading all the xml elements and passing it to a collection of object that will be bound to the repeater( results.DataSource = listOfObjects; results.DataBind(); )

Now here is the problem. In each row of the table there is columns containing static informations and the last cell of the row is an img button that represent a gray checkmark and that on click should change to green. However, onclick now I only change the data to the xml, and on next "File map" it'll be there. I cannot simply refresh the page, because it takes a fairly long amount of time to refresh because most of the times there is over 350 records to load and above that, you cannot simply refresh page because the page is call through ajax and a refresh will bring you back to the default.aspx. I've already built a function to get the param back through jQuery, however I really have no clue how to bind it to the image. Current line with image:

<a href="JavaScript: // Toggle Status" onclick="PutParam('<%= ProjectId %>', '<%# Eval("TargetUrl") %>', 'IsQAComplete', '<%# ((bool)Eval("IsQAComplete")) ? "False" : "True" %>', '<%= Lang %>', '<%= ProjectName %>'); "><img height="12" width="12" title="Toggle
completion status" src="images/<%# ((bool)Eval("IsQAComplete")) ? "complete" : "incomplete" %>.png" /></a>

IsQAComplete being the bool used used for checkmark which is referring to the listObject. <--- the listObjects Collection remains unchanged Get what the checkbox state should be referring to xml file.

GetParam('<%= ProjectId %>', '<%# Eval("TargetUrl") %>', 'IsQAComplete', '<%= Lang %>', '<%= ProjectName %>');

Posted: Feb 26, 2010 02:06 PM

View 1 Replies!   View Related
Web Forms :: Autorefresh Page Every 20 Seconds On Condition
When I user clicks a button on WebForm1 it will call a SQL Server Agent Job and navigate them to a webform2 that displays the job status (in grid view)

job takes 2mins or so to run...

I would like to know how to

1)auto-refreshWebForm2 every 20 seconds

2) once the status in the table ie column Status is"Finished" then stop the auto refresh and make visible a close button

Note I want to autofresh without clicking on anything on webform2...

Posted: Nov 13, 2009 03:50 PM

View 5 Replies!   View Related
Jquery - How To Autorefresh MVC Webpage If Condition Is Met In Background
I am working on having the following functionality for my mvc website. I want to have, for example 5 selected users voting on some question. When a user has voted, they will remain in a 'waiting' state until everyone has answered. Once those 5 users have answered, the page would autorefresh and I can populate the next question.

My basic thinking is that I need something like the following pseudocode to execute every so often (say 10 seconds) to check the status, possibly in jquery... then my controller can populate the next question.

while(condition not met) { } //wait
refresh()

Is there any simple way to fulfil this functionality?

Posted: Feb 9 at 4:26

View 2 Replies!   View Related
MVC :: Autorefresh View Using Jquery.load Method
I want to auto refresh the MVC view using jquery.load method ( it is not partial view) after each 3 seconds. what will be syntax for this.

Posted: Feb 16, 2011 03:18 PM

View 2 Replies!   View Related
The Use Of PartialView In MVC?
Just I am learning MVC,(ofcourse i get enough information from MS Website).I want to quickly clarify some details.

1) What is the use of PartialView in MVC,Is it similar to partial update of Ajax? I am does the partialView modify the HTML DOM structure?

2)Can i use Response.Redirect() in MVC?

Posted: Apr 7 10 at 7:57

View 3 Replies!   View Related
MVC :: PartialView Outside Of Form - ViewData
I have a little MVC 3 challenge that I am trying to overcome.Here is my scenario:I have a controller called PersonController.cs with 5 methods:Add Add (post) Edit Edit (post) PopulateName(string EmailAddress) - POST

I have a viewdata class called PersonViewData.cs with 3 pieces of data:

Email FirstName LastName

I have 2 PageViews (Edit.aspx and Add.aspx)I have 1 PartialView (Details.ascx) - with 3 textboxes (Name, Email, Phone)I want to reuse this partial view in both the Edit.aspx and Add.aspx Views.

The user should NOT enter the First Name/Last Name - rather, once the user has entered the email address (OnChange of Email textbox), the First Name/ Last Name of person should be populated. This is done using the PopulateName(string EmailAddress) controller method. Meaning, I have an AJAX Form inside the partial view

Then once all 3 fields are populated. The user should be able to submit either the Add or Edit HtmlForm.

Code of Edit.aspx:
[Code]....

Code of Add.aspx:
[Code]....

The main issue is as follows:I have an AJAX Form inside the partial view. Since now we have a PageView Form and nested PartialView AjaxForm - Form within a Form - the Browser has a hard time with this concept. In fact, when a person enters an email address, the frmEdit/frmAdd gets submitted.

Posted: Mar 16, 2011 07:42 PM

View 5 Replies!   View Related
MVC :: Ajax. Result With Two Or More PartialView?
I have page with few "placeholders". And I want to update all them with one ajax request. To update first I use First.ascx. To update second I use Second.ascx.

If I need to update only one "placeholder" I use PartialViewResult. But what to do with two or more?

how to place HTML from partial views into one json object?

Posted: May 19, 2009 11:26 AM

View 2 Replies!   View Related
MVC :: How To Deal With Two Or More Same Partialview In One Page
I create a partialview named CityBox and render twice in one page,one is LeavingCity and other is ReachCity.The CityBoxpartialview have the sameIdin it'shtml element. How can i get this partialview data when I post this page. IfI use IModelBinder to bindthe two partialview to theViewPage'sModelObject . How can i write this binding code?

Posted: Aug 27, 2009 08:38 AM

View 1 Replies!   View Related
UserControl Or PartialView Using .net MVC 3 Razor?
I would like to display 3 three userControls on a home view

UserControl1 ==> Enterprise Entitypartial view

UserControl2 ==> Client Entity partial view

UserControl3 ==> Biling Entity partial view

A submit button to save all values

So my home will display the 3 partial views and enable me; when I clicksubmit button ;
to save Enterprise Data, Client Data and Biling Data.

Posted: Mar 15, 2011 04:44 PM

View 1 Replies!   View Related
C# - How To Change PageTitle From PartialView In Mvc
I want to change Page title from partial view. But following error shown

Using the Title property of Page requires a header control on the page. (e.g. <head runat="server" />).

My master page head section is here

<head runat="server">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
</title>
</head>

My Default page is here

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
<%=ViewData["pagetitle"] %>
</asp:Content>

ViewData["pagetitle"] returns current page title for example Home, About, News List, News Detail. But i want to change current news information title instead of News Detail string. News Detail page contains partial view. Partial view know which news shown.

Posted: Mar 6 at 11:39

View 1 Replies!   View Related
MVC :: Showing Data By ViewData On PartialView
i am using this code that returns data form 3 tables

[Code]....

and i have a PartialView that will show the data.so how can i show the data in a foreach on my PartialView

Posted: Mar 21, 2010 02:41 PM

View 5 Replies!   View Related
How To Access ViewData In A PartialView From JQuery In MVC?
I have a View loading a PartialView via jQuery. The PartialView has ViewData that the jQuery needs to access, but I can't seem to get to it from the jQuery. The code below uses the HighChart jQuery plugin (and it is just test code taken from the HighChart example page):

<script type="text/javascript">
var chart1; // globally available [Code]....

This jQuery is in the main view, because I don't know how I could put it in the PartialView with the document ready function. But by putting the call to the HighChart function in the callback of the get() function it works in the partial view. But accessing the ViewData doesn't...

How can I achieve this? I need to get the data from the PartialView action method in order to populate the HighChart data...

Posted: Dec 29 10 at 1:02

View 1 Replies!   View Related
MVC :: Validation Clashing With Partialview - Remedy?
I have a view that is used as a search screen for a client database. I wanted to carry out the search using AJAX so the page would update smoothly. However, now the AJAX and PartialView are working, when validation is triggered by leaving both search fields empty, the reposted view appears inside the PartialView DIV ("Results"). The Page section looks like this:-

[Code]....

how I can stop the returned validation displaying inside the PartialView?

Posted: Feb 01, 2011 01:35 PM

View 3 Replies!   View Related
ASP.NET MVC 2 - POST Form Model From PartialView?
I have a single model type to wrap up various models I want to use in my view:

public class QuestionViewData {
public Question Question { get; set; }
public IList<Answer> Answers { get; set; }
}

Now, in my question view I pull the data from the Question object - that's fine. Secondly I iterate through all Answer objects and pass them to a partial view:

<% foreach(Answer item in Model.Answers) { %>
<% Html.RenderPartial("ShowAnswer", item); %>
<% } %>

For each answer (in the partial view) I have some action buttons (like ratings). I'm using separate form POST's with hidden fields for every button. The problem is that I can't post the whole QuestionViewData model to my action method cause I only have the Answer object as model in the partial view. However, I need to return the complete question view from that action that takes QuestionViewData as model.

Posted: Mar 1 10 at 20:28

View 2 Replies!   View Related
Reload PartialView From JQuery In MVC 2 Application?
I'm trying to use jQuery to load a PartialView. It does this fine at the first loading of the page. But then I need to be able to reload the PartialView when a save button is pressed. I get a reload, but this time the PartialView is all I get back. I.e. I don't get the PartialView loaded as a part of the main page, but rather as a page of its own. What am I doing wrong?

Here are the relevant parts of the jQuery in the View:

[code]....

Posted: Dec 7 10 at 15:44

View 1 Replies!   View Related
MVC :: Passing And Retrieving Object To PartialView?
This is the first time for me trying to send data in the 2nd param to a artialView. So in my View I have:

[Code]....

First I'm not sure that I have the <% %> right.Second, in my Partial View Textbox.ascx, I strongly typed it also to my ViewModel class just like I did in my View..the same ViewModel class. My ViewModel class has a Property of type Personas. So I assumed that since I'm passing a p (of type Personas) to my RenderPartial as the object to pass to i

Posted: Jun 24, 2009 02:12 AM

View 4 Replies!   View Related
MVC :: Calling PartialView From A Javascript Function?
how to calla partial view fromwithin a Javascript function? I've looked around the web, but all the examples that I have been able to find areexamples using Ajax.ActionLink or Ajax.BeginForm.

When a user clicks onan item, I want to be able to hide/display someDivsand possible do other operations before calling the partial view. ActionLink doesn't appear to provide that ability. Depending upon the item the user clicked, I may be assigning the results of the PartialView to the same Div, or to a different Div.

What I'm looking to achieve, is to have an onclick handler associated with the item which performs whatever other operations might need to be done, then assign the result of the call of the PartialView to the appropiate Div. In some instances, the function might even be making two separate calls to PartialViews, to update the content of two separate Divs.

Posted: Aug 02, 2010 07:23 PM

View 1 Replies!   View Related
MVC :: Cannot Work With Strongly Typed PartialView
LogOn.ascx contorl whih is rendered on master page:
Site.master:
<% Html.RenderPartial("LogOn"); %>

On LogOn.ascx control there is a form with "username" and "password". These values are submitted in LoginController:

[Code]...

Posted: Dec 17, 2009 08:37 AM

View 1 Replies!   View Related
MVC :: Rendering Partialview After Ajax Submit?
I am new to ASP.NET MVC and I want to know how I canachievethis.In a page I have an ajax form created using ajax.BeginForm. what I want to do is to load a partialview which will load jqgrid using json result when I click the submit button. I wouldappreciatehow i can get this accomplished

Posted: Nov 20, 2009 02:42 PM

View 3 Replies!   View Related
MVC :: Insert PartialView W/ Data From Aspx Page
I have an aspx page with a partial view inside of it. I am inserting the partial view with the syntax like this: <TagPrefix:TagName ID="PartialView1" runat="server"/>

I get "Object not set to reference errors though, unless I click a link to the data with my controller like this:The partial view has a controller that loads data like this: [Code]....

Posted: Jul 02, 2009 10:13 AM

View 2 Replies!   View Related
Adding Jquery Functionality On PartialView Load?
How can I attach jquery on an ASP.NET MVC partial load. I've a form rendered in a partial that has some jquery attached, but that code is not running at all

Posted: Apr 23 10 at 8:24

View 3 Replies!   View Related
MVC :: EnableClientSideValidation In A PartialView (jQuery Tab) With A Ajax.BeginForm?
I got a problem with client side validation not firing, after reading many posts I believe it as to do with the HTML being loaded "afterwards". But I can not seem to find any solution.You got any ideas how to solve it?

[Code]....

[Code]....

[Code]....

Posted: Oct 14, 2010 09:59 AM

View 1 Replies!   View Related
MVC :: Access Partialview Hidden Column In Main View?
how to access Partialview Hidden column in Main View(in ASp.net Mvc App)

Posted: Jan 11, 2010 05:52 PM

View 2 Replies!   View Related
MVC :: Ajax.BeginForm Not Displaying PartialView Always Redirects To New Page?
I have a very simple app where a user enters 2 text values and presses a button, I want a confirmation message to be displayed on the same page however it keeps redirecting to show the partial view as a full view.

This is my home View:

[Code]....

This is my ContactController:

[Code]....

And finally this is my Confirmation PartialView

[Code]....

This is using MVC 3/.Net 4, I have downloaded an MVC 2/.Net3.5 sample project from the web that is doing exactly the same which works fine. What am I doing wrong?

Posted: Feb 09, 2011 08:30 AM

View 7 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved