Display SQL data row change using Signal R - asp.net

I'm new to Signal R, My situation is below
User inserts new record into table database
There is a new notification displaying on web form
However the old notification is kept, the latest notification will be changed by other background color(Facebook or gmail) is an example.
Tech used: Asp.net 4.5 Web form and SQL server 2012.
Thanks

Related

Entity Framework 6 triggers and notify app with db changes

I am relatively new to EF and I was tasked with researching Triggers within EF (using the EntityFrameworkCore.Triggered).
The scenario is this: a person has a handheld device (i.e. scanner) and scans a product into inventory. This action inserts the data into the SQL Server table.
As soon as that happens, I want another application to receive the notification so that another user can do his/her assigned task(s).
I thought EF Triggers would be able to do this rather than using SQLTableDependency.
Any advice/pointers?

Repopulate Dropdown when database changes in asp.net mvc

Customer table has two fields : FullName And Gender
Lets say , I have dropdown customers. Customers is populated by fetching data from the customer table.
Now Lets I say I have two tabs open in the browser
1)You can perform CRUD functions on Customer table
2)Contains the customers dropdown and some other relevant data.
Performing a Crud operation in tab1 should automatically update the dropdown in the second tab without a refresh page.
How can I achieve this in asp.net mvc or asp.net ?
Like is it possible to bind my dropdown to a table change in asp.net ?
You need to make use of Web Sockets. This protocol keeps a TCP connection open between the server and the client and changes to the customer table can be sent to the client.
The good news is that Microsoft provides an implementation of Web Socket protocol called SignalR and that simplifies things a lot.

asp.net refresh web page on DB changes

I'm currently working on an asp.net website.
I have a page (main.aspx) which displays records from a database table. Another page (editing.aspx) is responsible for editing records in the DB table.
let's assume we have a scenario where two users are using the website, user1 (on session1) is viewing the records in main.aspx, user2 (on session2) is editing the DB table from editing.aspx, what I want is: to refresh main.aspx for user1 when user2 saves his changes to the DB table.
I tried using an AJAX timer that pulls the DB for changes every 10 seconds, and refreshes an UpdatePanel (in which I'm displaying the records), and it works just fine, but I want to know if there'se a better way than pulling the DB server for changes.
thanks.
It is debatable if the other way is better but what you are looking for is persistent connection to the server that lets the server send e message to the page. There is a good library for .NET called SignalR that abstracts away the details. It is certainly more network efficient but depending on your use case the update panel may be good enough. Basically with SignalR you will send a message from the server-side code of your edit page which would be received by a JavaScript function on your main page. Then you either show the data or cause a refresh in some way.

Sqlite database connection with c#

Hi Am developing a windows phone app and using Sqlite DB and as a first step created login page. Now once i close my application the database does not persist and end up creating DB evertime the app opens followed by adding all values. How to i make it persistent and retain all values instead of adding them again and again?
Thanks
AV
Save the database file in the isolated storage . this is the place you should save all your application data you need to persist for next executions

How to trigger a local application from a SQL server or web server

We have created a ASP.NET website to give ticket-based support to our customers. Together with our software, we have given a separate VB6 application where customers can send queries to us, and they can see replies, if any. This application loads the ASP.NET page inside a Web Browser control. When customers send queries, it will be added to our database; and we send replies to their questions. So ultimately we will be putting replies in a "reply" column of the table.
I want to show replies to customers as soon as we add them. We have set a timer in our support application which checks whether a reply is present in the database. If so, then we show it. We need to check every 5 minutes that any replies are present in the database. So I think it is what is responsible for more traffic and load on my web server and SQL Server.
Is there any mechanism by which we can trigger the support application which loads the ASP page from the web server? whenever we add a reply to a particular customer, it should be shown to that customer. How this can be done? Are there any better ideas?

Resources