i am Creating messaging system in asp.net. how can i call client on database change? for example user's Page is open and another user sending message for that user. how can Software notify User ? is it right to call web-service every X seconds/minutes ? any solution with jQuery / AJAX /Comet ?
I'm dynamically binding tables and sub tables using nested listviews. On the client side I have a piece of jQuery that is toggling the visiblity of TRs witin the tables in order to provide a group expand / contract view option.
On postback I'm obviously loosing my class changes that I have applied via jQuery. I'm wondering what the best approach to maintaining these client side class changes is? I've considered creating a hidden input control per table to store the indexes of the visible TRs at the time of expanding them. The intention being to then look for the indexes during postback / rebinding and add the visible classes to each corresponding element.
Is there a better approach or some native method of passing back the client side style / class change to the server during postbacks?
how to jquery call a other call function other class is not static
[WebMethod] public static bool Verify(string username, string password) //Do your logic with username, password here //I am just checking with admin/admin credentials Console.WriteLine("Ritu"); [code]...
The AjaxToolkit has a ReorderList. I'm searching for a jQuery solution that does the same and found this page. I would like to change the order of divs (vertically) and upload the new order to the database (ajax).
I am developing web application and in application i need to make call of jQuery using .ajax(); method with datatype is set jsonp. Now all works well with limited data but problem start to occur when data size is increasing......
which returns <div>here</div><script language=javascript>alert('');</script> The content gets loaded property, but no alert. How would I get a javascript routine to work from an ajax call along with posting the HTML code?
now the alert message is very simple. i expect the alert message like the above link so, what i have to do in Alert.cs why i would like to do in Alert.cs is lot of pages refering this class only so that without any other changes my project will work.
I've inherited some code which breaks a page up into tabs using divs. On the first page there are many required field and regex validators. The problem is a user can switch to another tab, trigger a postback and fail the validators on the first page, leaving things in a mess.
What I want to be able to do is perform the validation on the first page as a user selects another tab, thus preventing them from moving to a new tab until the first page is valid.
Note use of jQuery for cross-browser compatibility with click event. And this only works if there are no validators on other tabs, as per Thomas' answer, I'll need to use validation groups and extra logic in isValid if any get added.
I'm trying to update just the bing map I am using in an UpdatePanel because it takes a few seconds load. I need to call a javascript to refresh my pushpins though when the refresh is complete.
I have a VB.NET ASP.NET webserver program running. One or more VB.NET clients are making use of it. Nothing special so far. As far as I know, the server is not really aware of the clients. Clients can request data. But is it also possible to let the server call-back a specific client when something happens? So that the client doesn't need to poll?
To be more specific, this server is connected with hardware modules. Clients could be terminals that show the status of a sensor for example. When a sensor gives an "alarm" value, it would be nice if the server could pass that alarm towards the clients. Instead of letting the clients to check each X seconds if that alarm is active. Would be a waste of energy, especially because the chance this alarm goes off is almost zero...
I have a simple WCF service that I call server side from code behind via a service reference. It's used for validation and works and was automatically setup by Visual Studio and is using SOAP I think because the binding is wsHttpBinding.
I want to use the same WCF service, but call it client side from jQuery using ajax(). I'm trying to implement it by way of these instructions.
But if I make the changes to get the client side call working, I have to add the decoration below which I think will break what works on the server side and also change the system.serviceModel section in web.config.
I have a page that when the user clicks a button there is a custom loading panel placed in the update panel by the PageRequestManager BeginRequest event. So when the page is loaded the loading panel is removed. My issue is that when the user clicks a button that redirects to an httphandler the page is not reloaded therefore the loading panel is never removed.
So I'm trying to think of a way to remove the loading panel before the redirect occurs, whether this be with a client script call before the redirect or what ever. So far I've thought about trying to do Response.write("..."), then Response.Redirect().
foreach (var issue in data.GetRuleViolation()) { ModelState.AddModelError(issue.PropertyName, issue.ErrorMessage); }
But at the client side I am not able to take the benefit of ValidationSummary as the call is being made by AJAX. What is the right approach on validation.
<WebMethod()> _ Public Shared Function GetDate() As String Return DateTime.Now.ToString() End Function
I need this to populate the inside of the div with the string returned by the GetDate() function. I think this should use code similar to this:
[Code]....
I've pulled this example from this site: [Code]....
However, I simply cannot get it to work. Nothing happens. This is just a regular asp.net web project. I haven't done any sort of Ajax-enabling business other than including script tags in my markup to reference jquery.
Here's what the firebug console tells me when I click on the div:
POST http://admin/Default.aspx GetDate 404 Not Found -18ms
Edit: Note: test.aspx/GetDate must match your aspx page name and function name!
I am trying to get my ListView to select the item that was clicked.
I have it working with a CommandButton in the listViewItem, but I would like to have the item select when the user clicks anywhere on the row.
I need to somehow PostBack or otherwise get the ListView to return to the server and re-bind with data. I just don't know enough about client-side script to get this done.
This is the HTML client-side code of interest. Specifically, the onClick event.