locked
Making a hyperlink visible on webform during concurrent usage RRS feed

  • Question

  • User-1450604192 posted

    Hi,

    A hyperlink on my ASP.net webpage is set visible=false in the markup.

    After the user clicks a button some activity is performed and at the end button is made invisible and the hyperlink is made visible in code behind c# with appropriate link to download some data. Hyperlink becomes visible at the end as long as there is one user using the Webpage.

    When two users use the webpage Hyperlink becomes visible at the end only for one of them towards the end of the process and not for both.

    Please help on getting the hyperlink visible to any number of concurrent users.

    Wednesday, June 13, 2018 12:53 PM

Answers

  • User-821857111 posted

    When two users use the webpage Hyperlink becomes visible at the end only for one of them towards the end of the process and not for both.
    Yes - that's how the web generally works. If you want to make the link visible to all users who are currently looking at the page after one of them has posted the page back, you can use an additional technology like SignalR to do that.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 13, 2018 1:30 PM
  • User475983607 posted

    Hi,

    A hyperlink on my ASP.net webpage is set visible=false in the markup.

    After the user clicks a button some activity is performed and at the end button is made invisible and the hyperlink is made visible in code behind c# with appropriate link to download some data. Hyperlink becomes visible at the end as long as there is one user using the Webpage.

    When two users use the webpage Hyperlink becomes visible at the end only for one of them towards the end of the process and not for both.

    Please help on getting the hyperlink visible to any number of concurrent users.

    Correct and the expected behavior for a default website.   You must write code to toggle visibility by checking if a condition is meet and persist the state somewhere.  This code runs when the user requests the page.  The user will not see the changes until the page is refreshed.

    SignalR is a real-time messaging API that you can use to update concurrent user UIs.

    https://www.asp.net/signalr

    There are also JavaScript timers you can use to make an HTTP request to figure out if the visibility state has changed.

    https://www.w3schools.com/js/js_timing.asp

    http://api.jquery.com/jquery.ajax/

      

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 13, 2018 1:36 PM

All replies

  • User-821857111 posted

    When two users use the webpage Hyperlink becomes visible at the end only for one of them towards the end of the process and not for both.
    Yes - that's how the web generally works. If you want to make the link visible to all users who are currently looking at the page after one of them has posted the page back, you can use an additional technology like SignalR to do that.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 13, 2018 1:30 PM
  • User475983607 posted

    Hi,

    A hyperlink on my ASP.net webpage is set visible=false in the markup.

    After the user clicks a button some activity is performed and at the end button is made invisible and the hyperlink is made visible in code behind c# with appropriate link to download some data. Hyperlink becomes visible at the end as long as there is one user using the Webpage.

    When two users use the webpage Hyperlink becomes visible at the end only for one of them towards the end of the process and not for both.

    Please help on getting the hyperlink visible to any number of concurrent users.

    Correct and the expected behavior for a default website.   You must write code to toggle visibility by checking if a condition is meet and persist the state somewhere.  This code runs when the user requests the page.  The user will not see the changes until the page is refreshed.

    SignalR is a real-time messaging API that you can use to update concurrent user UIs.

    https://www.asp.net/signalr

    There are also JavaScript timers you can use to make an HTTP request to figure out if the visibility state has changed.

    https://www.w3schools.com/js/js_timing.asp

    http://api.jquery.com/jquery.ajax/

      

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, June 13, 2018 1:36 PM