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

  • SEARCH
  • Home
  • 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 565289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:51:22+00:00 2026-05-13T12:51:22+00:00

I have a link on the page and i want when the user is

  • 0

I have a link on the page and i want when the user is pressing it, to evaluate a method where i check if the usser is logged in. If not, i want to show up a modal popup.
I know how to do the back-end checking and how to redirect the user but i have problems
with the link button:

<asp:LinkButton ID="LinkButton1" runat="server" 
                        OnClientClick="redirectToWishList()">LinkButton</asp:LinkButton>

When i press it, it does a full postback instead evaluating the method where i show up the modal pop.

Do you have any workaround to not fire a full postback but check the method where i am doing the redirect?

Ps: The method which has to fire:

 public void redirectToWishList(object sender, EventArgs e)
{
    ASP.usercontrols_loginpopup_ascx loginUserControl = (ASP.usercontrols_loginpopup_ascx)UtilsStatic.FindControlRecursive(Page, "loginPopUp");
    ModalPopupExtender modal = (ModalPopupExtender)loginUserControl.FindControl("loginPopUp");
    modal.Show();

}
  • 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-05-13T12:51:23+00:00Added an answer on May 13, 2026 at 12:51 pm

    You need to call redirectToWishList as a function (including the parens): redirectToWishList()

    <asp:LinkButton ID="LinkButton1" runat="server" 
                            OnClientClick="redirectToWishList();return false;">LinkButton</asp:LinkButton>
    

    Also, if you return false in your function, you do not need to in the tag.

    UPDATE

    I misunderstood. The OnClientClick is for invoking JavaScript, not running methods in your code-behind. You need to OnClick instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i have a logout [link button] in master page and i want to show
If I have a JSF page that I want to link to where I
I have some textboxes on a page and I want to click a link
I have a subscription link on a page that the logged in users can
Scenario : I have a c# .net web page. I want the user to
my page have a link <a href=/hyperlink>Hyper link</a> i want to open a dialog
When a user clicks on a link on my page, I want to be
I have link in the master page in sharepoint. when the user clicks on
I have a link to a PDF on my web page and I want
I have a link which opens a table on the same page if user

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.