使用C#在Web应用程序中的通知 [英] Notifications in web application using C#

查看:61
本文介绍了使用C#在Web应用程序中的通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,请问我有没有人回答过我的问题...

如果你看一下codeproject的首页,或者你有一个facebook账号并且看看它的顶部,你会看到一个红色的部分,其中有一些数字代表你的通知..

现在这正是我想知道的代码而不是有人告诉我有关noty或者信号器当你知道它不提供这种服务。

i想为我的用户编写一个通知页面,以便他们可以看到所有当前的通知......请帮助我,任何优秀的程序员。 pleaseeeeeeeeeeee

Hello, please i have a question which no one have answered me on...
If you look at the top page of codeproject, or if you have a facebook account and look at it's top, you will see a red part with some numbers representing your notifications..
now that is exactly what i want to know to code and not someone telling me about noty or signalr when you know that it doesnt offer this kind of service.
i want to code a notifications page for my users so that they can see all present notifications... please help me on this, any good programmer. pleaseeeeeeeeeeee

推荐答案

要执行此操作,您可以执行以下操作。



1 - 使用Bootstrap徽章HTML。即http://getbootstrap.com/components/#badges

2-使用Jquery和CSS创建通知弹出窗口。





有关详细示例,您可以查看 HERE





希望这会有所帮助。
To perform so you can do something like this.

1-Use Bootstrap badge for HTML. i.e. http://getbootstrap.com/components/#badges
2- Use Jquery and CSS to create the notification popup.


For a detailed example you can have a look at HERE.


Hope this will help.


没什么特别的显示您想要的信息。它就像您想要在网页上显示的任何其他信息一样。如果你是一个程序员,它应该是一个简单的任务,只要你知道你的通知被定义为什么。



例如,如果你想知道人们有由特定用户回复论坛帖子,并且您希望显示下次帖子的作者访问该页面时有多少回复。您将定义您的业务逻辑,即自您上次访问以来,您的帖子已经有了回复。您已存储此数据,因此您将创建一个查询以在给定业务逻辑的情况下检索此数据。如果有多种方式,此查询中的数据将被传递回您的UI层进行演示。



对于任何数据,整个过程完全相同。 />


人们提到SignalR,因为这只是一种通过实时将数据从后端传送到前端的技术
There is nothing special about showing the information you want. It is just like any other piece of information you want to show on a web page. If you are a programmer it should be a simple task provided you know what your "notification" is defined as.

For example, if you want to know that people have responded to forum post by a particular user and you want to show how many responses there have been next time the author of the post visits that page. You would define your business logic, ie there have been responses to your post since your last visit. You have this data stored so you would create a query to retrieve this data given the business logic. The data from this query would be passed back to your UI layer for presentation if any of several ways.

The entire process is exactly the same for any data.

People mention SignalR, because that is just a technique for getting the data from you back-end to your front end in "real time"


ASP.Net提供 SignalR [ ^ ]在需要实现通知和实时更新时非常有用。你也可以找到很多关于它的教程。
ASP.Net provides SignalR[^] which can be very useful when there is a need to implement notifications and real time updates. You can find a lot of tutorials on it as well.


这篇关于使用C#在Web应用程序中的通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆