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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:34:33+00:00 2026-06-15T13:34:33+00:00

ASP.NET 4 Jquery 1.7.1 Browser: IE9 Hi I am using jquery with a gridview

  • 0
  • ASP.NET 4
  • Jquery 1.7.1
  • Browser: IE9

Hi

I am using jquery with a gridview control inside a UpdatePanel so, everytime I click on a row of the gridview Jquery edits the value of a HiddenField control, so when I need “the selected index”, I just use the value of the HiddenField. And everything works fine in Chrome and Firefox, but not in IE9. After clicking a row and assigning it’s index to the HiddenField, when I click a button and fire a server side event, when I retrieve the HiddenField’s value, I get its default value (the one defined in the mark-up), and not the changed one. And, strangely, if I use and alert(HiddenField.value), it shows me the row index! so, the problem only occurs on the server side function, even after the postback the HiddenField value is preserved, but always as default on server side…

This is my Jquery code:

$('[id$=divtxtIdPresentacion]').click(function () {

             var tex = $('#<%=HFSeleccionIndexRow.ClientID%>').attr("Value");

             var index = $(this).attr("commandargument");             

             if (tex != index) {

                 $('#<%=HFSeleccionIndexRow.ClientID%>').attr("Value", index);
             }

         });

And part of the button event:

 protected void gridPresentacionAgregar_SelectedIndexChanged(object sender, EventArgs e)
    {       

         int index = int.Parse(HFSeleccionIndexRow.Value);
         ...
     }

And the HiddenField (just in case):

<asp:HiddenField runat="server" ID="HFSeleccionIndexRow" value="0" />
  • 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-15T13:34:33+00:00Added an answer on June 15, 2026 at 1:34 pm

    Your hidden input fields are not within the update panel control. Any asynchronous round trips to the server will cause only those controls within the UpdatePanel itself to update on the UI, so even though the code-behind runs and updates the hidden fields, on the front end they stay the same because they sit outside the panel.

    Try moving the hidden fields within the <ContentTemplate> tag:

    <asp:UpdatePanel ID="upTripsGrid" runat="server" UpdateMode="Always">
        <ContentTemplate>
            <asp:HiddenField runat="server" ID="HFSeleccionIndexRow" value="0" />
            .....
        </ContentTemplate>
    </asp:UpdatePanel>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the specs: ASP.NET 3.5 using ASP.NET AJAX AJAX Control Toolkit jQuery 1.3.2 web
I am using ASP.Net and jQuery/jQuery UI and I am trying to use the
Hi This is kind of peculiar requirement.. I am using asp.net and jQuery together
Using ASP.NET MVC + jQuery : I need to use some values owned by
-- Running within ASP.NET MVC alongside jQuery -- I'm using jQuery to render a
I am using jquery with asp.net webforms..... I am using asp.net pagemethods and jquery....
I am using asp.net mvc and jquery to make ajax requests and when the
I am currently writing a small web app using Asp.net MVC and jQuery mobile.
I am developing an ASP.net site (using .NET 4, EF, jQuery Ajax, SQL Server
I'm using ASP.NET webforms and lots of javascript/jQuery. I'm looking for a really simple

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.