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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T04:13:49+00:00 2026-05-30T04:13:49+00:00

i am using jquery grid in MVC 3 .as a formatter option i am

  • 0

i am using jquery grid in MVC 3 .as a formatter option i am using following code as a script segment.

function viewformateadorLink(cellvalue, options, rowObject) {
             return "<a href=../xxx/yyy/Edit/" + rowObject[0] + ">" + cellvalue + "</a>";   
         }

but i don’t want to use href here .better option i have found is as follows:

func....(){
   var url = '@Html.ActionLink( "_name_", "Edit", new { id = "_id_" })';
           url = url.replace(/_name_/, cellvalue);
           url = url.replace(/_id_/, rowObject[0]);
           return url;    
   }

are there any simple way exist for passing parameter?

  • 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-30T04:13:50+00:00Added an answer on May 30, 2026 at 4:13 am

    If the value you want to pass to the link is in a JavaScript variable and you don’t want to use href, then I’m afraid you can’t go further than you already have gone and this is why:

    The JavaScript code is ALWAYS executed after the server-side code.

    I imagine you would like to do something like:

    @Html.ActionLink( "_name_", "Edit", new { id = *JAVASCRIPT VARIABLE* })
    

    but due to the reason I mentioned above, such thing is impossible.

    I would suggest you stick to any of the other methods you used in your question.

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

Sidebar

Related Questions

I am following Phil Haack's example on using jQuery Grid with ASP.NET MVC .
I am using the following function closure in a jqgrid (a jquery grid) to
I have this sample MVC project using jQuery grid. There is only one problem
I have an ASP.NET MVC 3 app and I'm using jQuery DataTables as grid.
I have the following jQuery code which I'm using to populate a jqGrid. It
I've been trying to implement jQuery's grid function in my Asp.Net MVC app. I'm
I am using the Infragistics jQuery grid in my ASP .NET MVC application. My
Using jQuery, how do you check if there is an option selected in a
Using jQuery's dialog I came across the following quirk (tested in FF3): User selects
I'm using struts2-jquery grid. gridmodel in my action class is getting updated correctly. But,

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.