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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:27:02+00:00 2026-06-01T20:27:02+00:00

On my Ascx page ive got 2 buttons, those buttons redirect to same page

  • 0

On my Ascx page ive got 2 buttons, those buttons redirect to same page atm. (because page should be exactly same). In Page_Load() method sender parameter doesnt have any parameters. How do i tell Page_Load event which button was clicked? so i can load different data depends on which button was clicked?

Are there any way to do it more dynamicly? or do i have to create a separate page for each button?

  • 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-01T20:27:02+00:00Added an answer on June 1, 2026 at 8:27 pm

    I dont know what you trying to do , this could be silly but still you can achieve this by doing something like this

    Button1_Click
    Response.Redirect("Default.aspx?id=1")
    
    Button2_Click
    Response.Redirect("Default.aspx?id=2")
    

    Then on the load event

    if(Request.QueryString["id"]==1)
    button1
    else
    button2
    

    You can also multiple parameters to a page like this

     Response.Redirect("Default.aspx?id=1&name=xyz")
    

    And retrieve it

    Request.QueryString["name"]=="xyz"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading a custom ascx control in page_load of the page that hosts
Because .ascx files are naturally rendered early in the page life cycle, if I
I've got an ASPX page rendering a search ascx page which in turn will
I've got an aspx page that renders an ascx page with filtering capabilities. Inside
I've got a repeater on the page. The repeater is actually in an .ascx.
I've got a page (aspx) that contains a usercontrol (ascx). On postback of the
I've got a user control that should use caching, with VaryByControl . The .ascx
I have a radio button list control on my ascx page and have a
My ascx control inside a container update panel does a full page refresh when
I have a .aspx page that loads three separate .ascx controls to represent adding,

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.