Refresh the Grid Automatically when table changes in the DB
like twitter and other facebook .
how to do this using any asp.net controls using c#
Pokein(Reverse AJAX Library) can help you
Doc
Sample project
You can use polling to check database changes if changed update page. For this you have to use AJAX UpdatePanel Timer controls.
If you want to do it automatically you need socket programming.
You can try this Comet based grid control.
You could create a function that checks whether database changes have been made, and then poll that function using async calls (jQuery in your View)
Related
I've seen multiple websites on the web where they allow you to manipulate data. (i.e. Insert records, delete records, edit records).
The cool thing I've noticed is that when you click remove button, the item removes instantly from the grid. and then it asynchronously goes to a database and removes record from there without bothering a user.
For example in a regular asp.net application if you're using gridview you need to wait until database operation is complete, because gridview is a databound control. If you use update panel you still see item in grid until DataBind event fires again.
Question: is there any js/.net library that will allow me to add such a functionality to the project out of the box?
Maybe you want to use WebMethod on server side + Ajax calls on client side (using jQuery for example).
You can you Client Side Grid Like JQGrid. http://www.trirand.com/blog/jqgrid/jqgrid.html. For loading and editing data you can use Web method or web Services. You can also use ASP.net MVC .
Yes you can do.You have web method that read your data from your source such as database.
You can call this method using Ajax and you can bind ajax response to gridview
Here is example Link
I'm creating a web application in which I need to Check the Database in regular Intervals for any new rows Updated in the table. If any Rows have been updated and return the Rows to the user.
When I refresh the Page I update the rows in my Website. But I need to Know If any new Rows have been added to the Table without refreshing the Page
How can I achieve this ??
Can you suggest me a Method (Probably which doesn't slow down the web site).
Can I achieve this using web services??
The usual way to do this is using javascript to hit a page on your website with setInterval posting back to a page to ask about any changes, web sockets can do this real time but require modern browsers.
Here is a similar question that's been answered well, though it's for Asp.net MVC:
Creating an AJAX alert for a user when there's a server-side change
If I'm being forced to use vanilla ASP.Net I do usually put those kind of requests into a webservice.
I want to programmatically create a table when the user clicks on a button. I have made a program in C# asp.net witch adds a HtmlTable inside a PlaceHolder (that is inside a UpdatePanel) when the action is performed. The problem is that the operation taks a lot of time (there is no database involved) and I want the table to be constructed before postback (I mean to add the rows with the data in time, when it was processed).
I don't know how this is done, or if it is posible. I don't know Ajax.
I can provide more details on the problem.
Thank you.
You can do that using jQuery, its quite easy and good to learn.
Super Simple
http://blogs.microsoft.co.il/blogs/linqed/archive/2009/03/04/generating-html-tables-with-jquery.aspx
I have a SQL server that does a back-end function that updates a field on a table with progress-percentage. I would like to efficiently update the value of the progressbar dynamically.
The webpage is a C# .aspx page and the progressbar is created using jQuery-UI.
What is the best method for doing so?
Thanks
In order you update the progress bar in real time you have to make asynchronous calls to the server to check the data. This is done using AJAX. There are many ways to do it using AJAX (ex. JS code, AJAXControlToolkit, etc). You'll have to decide which is the best option for you.
AJAX Wiki: http://en.wikipedia.org/wiki/Ajax_(programming)
ASP.NET AJAX Tutorials: http://www.aspnettutorials.com/tutorials/ajax/
AJAXControlToolkit: http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/
AJAX w/ jQuery: http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/
how do i make an autocomplete textbox in asp?
but i need to get the autocomplete data by querying the database.
I dont really know how to explain this, sory if theres not enough detail.
i cant use ajax, because i think i will have compability issues with my old app.
so im thinking of doing this using java script. or is there a way to do this by using .net?
im using C# for codebehind. thanks
It's going to be a lot of effort without using some third party autocomplete I think - not sure what you mean by 'I can't use ajax', but how about using the ASP.NET AJAX autocomplete control, setting the ServiceMethod property to a static Page Method in your code behind? That keeps it contained within your page at least.
The Page Method can go off to your database, and return a String[] of results.
If you decide to use it, you'll need to set the EnablePageMethods property to true in the <asp:ScriptManager> control.
AJAX is JavaScript. It's JavaScript using the XMLHttpRequest object to make the asynchronous request. Here's an article about it and ASP.NET.
If you want to know more about AJAX, (Asynchronous JavaScript and XML), I'd check out Wikipedia first. If you want books on it, there are a ton. I recommend Programming ASP.NET AJAX by Christian Wenz (O'Reilly And Associates).
if you dont want to uses ajax library, try jquery
there are many plugin autocomplete or suggest textbox for jquery
try this one
http://www.vulgarisoip.com/2007/08/06/jquerysuggest-11/
The ASP.NET AJAX framework works for ASP.NET 2.0 & above. As such it will not work in Visual Studio 2003 environment.
Anthem.NET is a free, cross-browser AJAX toolkit/framework for the ASP.NET development environment that works with both ASP.NET 1.1 and 2.0 -
http://sourceforge.net/projects/anthem-dot-net
For your autocomplete requirement, you can consider using the jQuery Autocomplete Plugin
It requires very less programming. Check the demo & code sample here - http://docs.jquery.com/Plugins/Autocomplete
It's autocomplete() method takes a URL or array to populate your autocompletion list. You can pass the URL of the page that fetches the results from the database directly.