0
我采取松散地基于对这篇文章的通知系统:ASP.net modalpopup
http://www.4guysfromrolla.com/articles/110409-1.aspx
其中一个变化,我需要做的是展现出modalpopup(使用用户登录后如果用户发布了要阅读的通知,则使用ModalPopupExtender。
由于用户在标准登录控件的LoggedIn事件后重定向,弹出窗口不显示。 我怎么能避免这种情况?
Protected Sub Login1_LoggedIn(ByVal sender As Object, ByVal e As System.EventArgs) Handles Login1.LoggedIn
'See if this user has unread announcements
Dim announcementAPI As AnnouncementBLL = New AnnouncementBLL
Dim UnreadAnnouncementCount As Integer= announcementAPI.GetUnreadAnnouncementCount(Login1.UserName)
If UnreadAnnouncementCount > 0 Then
UnreadAnnouncementMessage.Text = String.Format("You have {0} Announcement that you did not read yet.", UnreadAnnouncementCount)
'Show modal popup for announcement!
UnreadAnnouncementModalPopup.Show()
'add soothing so user don't get redirected.
End If
End Sub
Protected Sub Read_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Read.Click
Response.Redirect(String.Format("~/Announcements.aspx?RedirectUrl={1}", _
Server.UrlEncode(FormsAuthentication.GetRedirectUrl(Login1.UserName, False))))
End Sub
Protected Sub Ignore_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Ignore.Click
Response.Redirect(FormsAuthentication.GetRedirectUrl(Login1.UserName, False))
End Sub
是的我正在使用“标准登录控制”,更新了问题。 – DavRob60 2010-06-08 14:52:33