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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T10:16:19+00:00 2026-06-01T10:16:19+00:00

I want to know Id update panel that initial a request in JavaScript .I

  • 0

I want to know Id update panel that initial a request in JavaScript .I write this script but it return undefined.

var prm = Sys.WebForms.PageRequestManager.getInstance();
prm.add_initializeRequest(InitializeRequest);
prm.add_endRequest(EndRequest);

function InitializeRequest(sender, args) {
    alert(sender.ID);
}
function EndRequest(sender, args) {
}

sender is not null and it return [object] but How I can get ID?


Edit 1)

I think when UpdatePanel be inside MasterPage it does not work.this is my code:

<script type="text/javascript">
    $(document).ready(function () {
        var prm = Sys.WebForms.PageRequestManager.getInstance();
        prm.add_initializeRequest(InitializeRequest);
        prm.add_endRequest(EndRequest);


        function InitializeRequest(sender, args) {
            var UpdPanelsIds = args.get_updatePanelsToUpdate();
            alert(UpdPanelsIds[0]);
        }
        function EndRequest(sender, args) {
            if ($('.AlarmLogo').val() == "3") {
                alert('nima');
            }
        }
    });


</script>

and :

<form runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Timer ID="timer" Interval="4000" runat="server" OnTick="timer_Tick" />
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <asp:Panel ID="pnlAlarm" runat="server" CssClass="pnlAlarm" ClientIDMode="Static">
            <a href="#">
                <div id="Alarm">
                    <asp:TextBox ID="lblContent" runat="server" Text="HHHEEELLLOOO" CssClass="AlarmLogo" ClientIDMode="Static"></asp:TextBox>
                </div>
            </a>
        </asp:Panel>
    </ContentTemplate>
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="timer" />
    </Triggers>
</asp:UpdatePanel>
    <div class="main">
        <asp:ContentPlaceHolder ID="MainContent" runat="server" />
    </div>
</form>

and code behind:

protected void Page_Load(object sender, EventArgs e) 
{     
    if (!IsPostBack)     
    {         
        Session["nima"] = 1;    
    } 
} 

protected void timer_Tick(object sender, EventArgs e) 
{    
} 
  • 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-01T10:16:20+00:00Added an answer on June 1, 2026 at 10:16 am

    You can use the get_updatePanelsToUpdate that return an array with the Ids of the UpdatePanels that will be going to updated.

    <script>
        window.onload = function() {
            var prm = Sys.WebForms.PageRequestManager.getInstance();
    
            prm.add_initializeRequest(InitializeRequest);
            prm.add_endRequest(EndRequest);
        };
    
          function InitializeRequest(sender, args) 
          {     
             // get the array of update panels id
             var UpdPanelsIds = args.get_updatePanelsToUpdate();
             // get the Post ID
             args.get_postBackElement().id;
          }
    
          function EndRequest(sender, args) {
          }
    </script>
    

    http://msdn.microsoft.com/en-us/library/ee224805.aspx

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

Sidebar

Related Questions

I want to know number of rows that will be affected by UPDATE query
I know that update panels help rendering part of a page, but what I'm
I'm working on a rather complicated site. We have an update panel that contains
An update panel, a postback and jQuery. Sounds like a bad joke, but here's
I know how to write a web-service but until now I used them with
I want to know that how does automatic migrations work internally in Entity Framework
I know you can can do this using MVC. But not sure if you
I know this flavor of question has been asked multiple times, but I've spent
I know this is probably something so simple that I am just not able
I want a validation to run before a record gets updated. I know of

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.