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 8327037
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T00:58:04+00:00 2026-06-09T00:58:04+00:00

Currently I have this… public void lnkTag_Click(object sender, EventArgs e){ … } Which is

  • 0

Currently I have this…

    public void lnkTag_Click(object sender, EventArgs e){
        ...
    }

Which is attached to the click() event of link buttons, but the problem is this requires a form resubmission when the user tries to back in the browser after clicking one.

I’d like to turn this into an ajax call that passes in the text value of the link. So to have a method like this in the code behind:

    public void lnkTag_Click(string linkText){
        ...
    }

Where this method is accessed via ajax on a

  $('myLinkButton').click(function() {
      $.ajax...
  })

Any thoughts? Thanks.

  • 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-09T00:58:06+00:00Added an answer on June 9, 2026 at 12:58 am

    Do the following for sending the parameter value:

    $('myLinkButton').click(function() {
        $.ajax({
            type: "POST",
            contentType: "application/json; charset=utf-8",
            url: "yourpage.aspx/lnkTag_Click",
            data: "{'linkText': '" + linkTextValue + "'}",
            dataType: "json",
            success: function(data) {
                //do something if it's successful
            },
            error: function(jqXHR, textStatus, errorThrown) {
                //do something if there's an error
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have this type of code: private void FillObject(Object MainObject, Foo Arg1, Bar
I currently have this installer: class DemiInstaller : IWindsorInstaller { public void Install(IWindsorContainer container,
I currently have this method header: public virtual void SetupGrid<T>() where T : class,
I currently have this: function submit() { document.getElementById(lostpasswordform).click(); // Simulates button click document.lostpasswordform.submit(); //
I currently have this code which stores XML into an XML-type column called data,
I currently have this statement in my SQL View (SQL Server 2008 R2) which
Currently have this code defining getter/setter for an object's selectedID property. The object is
I currently have this in my code tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(updateLeftLabel:)]; which
I currently have this code that creates 4 tabs using tabactivity: public class toknapp
I currently have this action to create an object. def create @campaign = Campaign.create(params[:campaign])

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.