Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8452239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:26:54+00:00 2026-06-10T11:26:54+00:00

I have an application that creates user notifications when various things happen within the

  • 0

I have an application that creates user notifications when various things happen within the application.

Each notification contains a link that is generated upon creation of the notification that directs the user to the part of the application the notification intends to draw attention.

This link can be to anywhere on the site.

Upon creation, a notification is marked as unread = true, when a user clicks the link I want to take the user to the proper location, but also fire an action that will set the notification to unread = false.

How can I accomplish this? Is there a way I can filter all links on a page to first be redirected to an action that sets the notification to unread = false then takes them to the url? I’m not exactly sure where to start here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:26:55+00:00Added an answer on June 10, 2026 at 11:26 am

    Do an Ajax call in onclick of the link

    $("a").click(function(){
      $.ajax({
         url: "url_to_make_notification_read",
         data: notification_id;
      });
    });
    

    Edit: another solution (perhaps better)

    Or perhaps you do not really need an extra Ajax Call at all. If I understand your question properly, I believe you have an action like:

    public ActionResult VisitNotification(int notificationId){
         // Do things
         return View("whatever");
    }
    

    Just change it to

    public ActionResult VisitNotification(int notificationId){
         // Do things
         var notification = Repository.GetNotification(notificationId);
         notification.unread = false;
         Repository.Save();
         return View("whatever");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program that creates a notification if the application is not running.
I have to create a user in a third party application that stores its
I have created an application that uses settings.settings to store some user specific settings
i have an Java J2ME application that does (at user request) create HttpConnections to
I'm using: Hibernate MySQL jBoss I have to create an application that allows user
I have an application that creates invalid Directories... e.g. c:\Program Files\somedirectory. - the period
I have created an application that creates bar graph based on inputs read from
I have application that brings response via Ajax and creates 5-20 new jQuery click
I have a .Net application that dynamically creates a small HTML page and pops
Today we have a windows application that, using an OCX, creates a web page

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.