I have an asp:LinkButton which require following –
– call jQuery to open link url in another tab of current browser
– then call server side method to perform some logging stuff
Please guide me for a
-
safe (which can help avoid having ‘popup blocked’ messages as far as possible), I understand I shouldn’t override any user personal setting for popup blocker but as it is a direct user click on asp:LinkButton, was wondering if there is a neat solution to avoid Popup blocker messages and
-
an efficient and user friendly way of calling server side method (where I can avoid postback)
Thank you!
Having Javascript make a call like:
will always run the risk of being caught by a popup blocker. Is there a reason why you can’t just set target=”_blank” on the <a> tag?
As far as calling a server-side method without doing a postback, it’s not possible. You could use JQuery’s ajax function to make a call to a server side method where the page doesn’t refresh, but a post-back must still occur, whether it is visible to the user or not.
Here is what that looks like: