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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T00:57:56+00:00 2026-05-19T00:57:56+00:00

the question says it all : i have a linkbutton to which i pass

  • 0

the question says it all : i have a linkbutton to which i pass through CommandArgument a value and i need that value to be a javascript value. Thanks!

Edit :

here is my linkbutton tag :

< asp:linkbutton id="prevBut"
runat="server" OnCommand="load_com"
CommandArgument=to_place_javascript_string
Text="previous" />

and the function :

public void load_com(object sender, CommandEventArgs e)

{ //get the string from e and search through the database for something   }

i want to pass the name of a photo that is stored in a variable $.galleria.current.

  • 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-19T00:57:57+00:00Added an answer on May 19, 2026 at 12:57 am

    You need to stop for a moment and think about what the LinkButton is actually doing. It’s not magic. It’s just posting the form for you.

    As such, you can…

    • define an onsubmit handler to stuff that javascript value into a hidden form field

    • or, replace that LinkButton with a simple <a onclick=”dostuff()”> pointing at a function that stuffs your value into a hidden form field and submits the form

    • or, replace that LinkButton with a simple <a onclick=”dostuff()”> pointing at a function that constructs a URL containing ?myvalue=whatever and redirects to it.

    There’s no reason you need to involve ASP:LinkButton in any of it. If the built-in ASP.NET controls aren’t doing what you want. All you need to do is stop using them.

    (Incidentally, you’ll have a much happier and more productive career in the .NET world if you stop using Microsoft’s Rich Controls in favor of their HTML equivalents. Those things are there so that non-programmers can drag/drop their way to unmaintainable websites. Since you’re here, we can assume you’re not a non-programmer, and are therefore smart enough to ignore the marketing portions of ASP.NET and use the good stuff directly.)

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

Sidebar

Related Questions

The question says it all. If you have a bug that multiple users report,
The question says it all really. I'm hoping that I don't have to write
i think the question says it all, but I have an application that uses
I think the question says it all. I have several monthly processes in stored
Question says it all, I've got a 500,000 line file that gets generated as
question says it all. I have folding turned on in Eclipse (v3.4), and rather
Question says it all. I have two accounts on two separate hosted fogbugz-on-demand. One
Well the question says it all? I have a DataTemplate with a button is
The question says it all. I have a listbox whose rowsource is change programmaticaly.
The title of the question says it all. I have been researching SHA-1 and

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.