Is it possible to update another persons page from another page? ie what i am trying to do is... when a user updates a treeview with some data, i would like to broadcast the changes to any other user who is online and automatically update their treeview with the changes.
Is there some sort of pattern that i can have a look at to do this?
thanks yal...
In realtime? You would want to use JS polling or COMET techniques.
Heres a solution using silverlight and WCF Duplex http://blog.developers.ba/post/2009/02/25/Silverlight-chat-application-using-WCF-full-duplex.aspx
This looks awlright too http://code.google.com/p/aspcomet/ Should work with a JS client (see http://www.cometd.com/)
Related
I am developing a custom application feedback tool. The idea is that when the user launches a particular application, I want a pop-up to appear, say a couple seconds after the user launches the application, that asks if they'd be willing to provide feedback. The pop-up will simply be a new IE window. So, something similar in functionality to:
Response.Write("<script>window.open('" + sUrl + "', 'mywindow','resizable= yes,scrollbars= yes');</script>");
We have numerous web apps (ASP.NET) in our company, and I think the quickest solution would be to drop an HttpModule into the application's solution. For an ideal example, see: http://www.foreseeresults.com/.
QUESTION: Is invoking a new internet browser pop-up possible with an HttpModule? Or is perhaps invoking JavaScript from an HttpModule possible on the client's browser?
You can achieve this by using ASP.NET HTTP Response Filters.
You implement your custom filter and then set it inside a custom HttpModule or inside a Global.asax file by handling the PostReleaseRequestState event.
Bellow is an article by Scott Mitchel on HTTP Response Filters.
https://web.archive.org/web/20211029043851/https://www.4guysfromrolla.com/articles/120308-1.aspx
This article contains two simple response filters, which should give you the right direction on how to implement your case. I suggest you to display a modal dialog using jQuery and display a message. When user confirms that dialog open a new web page in new window (this way you'll also get around popup blockers).
Hope this helps!
Regards,
Uros
I know this question is quite basic but since there is lot of confusion what can be used and not from the HTML 5 tags i wanna know if i can use drag and drop feature of HTML5 in my asp application? There is no code yet, so sorry about that. Scenario is that there is a tree view with a list of details about students, if these details are stored in a table, i want to drag and drop their ids(only the text not the whole table or row) from the table to my select query. is it possible? i went through the following questions but didn't get a clear picture
ASP.net AJAX Drag/Drop? and Creating a drag and drop application in ASP.NET 3.5
Sure you can. ASP.NET is a backend product that generates HTML and sends it down to client browsers. The question of whether or not ASP.NET can generate HTML5 markup isn't as important as making sure that your audience will be using a browser that supports the features of HTML5 that you wish to implement in your app.
More to the point, however, is that 99% of the drag-and-drop implementations you'll find on the internet use a JavaScript framework (jQuery, YUI, AJAX Control Toolkit, etc). While ASP.NET might be the vehicle you use to deliver the javascript to the browser, it in-and-of-itself is not responsible for creating drag-and-drop application -- it is the javascript that creates the dynamic nature of the app in the browser.
Where ASP.NET gets involved is handling the updates/ajax requests that your client-side javascript app sends to it. Using your app as an example: dragging the student ID to your query would be done with javascript on the client, and the javascript would then send the query to your ASP.NET backend which would process the information and send the results back to your app in the browser (assuming it was a true ajax application).
Examples:
jQueryUI
YUI
you can use any valid HTML code inside the ASP.net code as well. finally ASP.net code will be converted into pure HTML. so you can use any valid html code. for more details on how to implement HTML5 drag and drop
I'm developing an application using ASP.Net.
For first the idea: "My WebApp needs an chronometerto be shared by users and all users will se the same value in cronometer. When a user clicks on a button, the cronometer needs to be restarted and all users will need to see that!"
All right, now I'd like to know what's the best choose to improve more performace an make sure that all users will see the same value in chronometer?
Need I use JSon (with jquery in client side), Timer with UpdatePanel of Ajax Extensions, pure Ajax (with JQuery) or any idea to suggested ? Any suggestion for how to shared a cronometer for all users in C# (put information in Cache or database) ?
Thanks all
Cheers
It is impossible for all users to see the same value in the chronometer. JQuery will be faster than an UpdatePanel (an UpdatePanel needs to post the whole page back to the server), but still some kind of polling to the server is needed. You could set the polling period to 1 second - in that case the difference in users' chronometers will be at the most 1 second. Even that value however is too low for a repeating Ajax request and could easily hog browser's resources.
I am actually not sure if a webservice would be the correct way to go or if there is a better alternative, but here is my question. I have a dropdown with some products and I want to give the user the ability to add a new product, so when they select add new, it will pop up a dialog and when they are done it will insert the new product into a table in the database. My UI is basically a dropdown that is just html tags and I want to use JQuery to hopefully handle the backend processing. My webservice or alternative is asp.net. Can JQuery do this? and does anyone have an example?
You can use JQuery to issue web service call. Here is a good example here. Then in your web service method, you will insert the record into the DB.
So, your web service is your bridge. JQuery itself is client-side technology.
I've always wondered what is the best way to add a new item to html-select in a website.
Yes, this may sound silly but it is a great problem from the usability perspective. I don't want the user to be taken to a new page every time they need to add new item to a html-select.
I like the way Google Reader and Gmail handle this problem in there "add folder" and "add label" functionality. I would like to mimic that but i have no clue how they did that.
I'm using jQuery, so any reference to plugins, code examples or tutorials are welcome.
I would like it to be as modular as possible so i can reuse it anywhere.
I'm using ASP.NET 3.5 web-forms, Microsoft Access 2003, jQuery, IIS 5 and Win XP Professional as web server.
Thanks.
there's a jquery select plugin that might help you with this. I've manipulated select lists client side and had no problem with subsequent form-submits but you'd need to do some experiments w asp.net
The standard technique of doing this is called ajax, which basically means replacing only parts of the page. JQuery ajax and maybe a tutorial should get you going.
A common mistake for this scenario is to add the item on client (using jQuery or plain javascript). It may look that it works until the next post-back. Unfortunately the Asp.NET post-back model does not allow to alter the controls contents on client side only. So basicaly there are two choices:
Use ajax (the simplest would be to
use an UpdatePanel)
Make a normal
postback to add the item (simple and
fast to code, if performance is not
an issue - for intranet applications
for example)