Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Finding the caller in sub???

Finding the caller in sub???

Scheduled Pinned Locked Moved ASP.NET
questioncsharp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mittalpa
    wrote on last edited by
    #1

    Hi I wrote following sub which is called in click event of two Command Buttons in VB.NET code behind. Private Sub CompleteSignup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnA.Click, btnB.Click Now, in the sub I want to know at a given time of its execution, who is the caller. Button A or Button B. How can I do that? Please advice. Thanks Pankaj Follow your goals, Means will follow you ---Gandhi---

    R 1 Reply Last reply
    0
    • M mittalpa

      Hi I wrote following sub which is called in click event of two Command Buttons in VB.NET code behind. Private Sub CompleteSignup(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnA.Click, btnB.Click Now, in the sub I want to know at a given time of its execution, who is the caller. Button A or Button B. How can I do that? Please advice. Thanks Pankaj Follow your goals, Means will follow you ---Gandhi---

      R Offline
      R Offline
      raj_sarna
      wrote on last edited by
      #2

      use sender object to identify ur object. in this case sender is ur button, just simply check it's id, like this : Response.Write(sender.id) and u'll know who's calling it. Parshu

      M 1 Reply Last reply
      0
      • R raj_sarna

        use sender object to identify ur object. in this case sender is ur button, just simply check it's id, like this : Response.Write(sender.id) and u'll know who's calling it. Parshu

        M Offline
        M Offline
        mittalpa
        wrote on last edited by
        #3

        thanks. I got it :) Follow your goals, Means will follow you ---Gandhi---

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups