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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:02:03+00:00 2026-06-10T15:02:03+00:00

newbie to asp.net here. I am building a reporting tool and trying to handle

  • 0

newbie to asp.net here. I am building a reporting tool and trying to handle logic on one single page so that report A is one aspx page and so and so forth.

Therefore, many controls / queries actually do not need to get executed on first visit of the page, where only parameters, such as dates, columns, are needed as input.

On clicking a button, or postback i suppose, these controls whether in charts or gridview form would generate. Back in the old dates when I did some ASP programming, I would put all the controls, codes within a if block is see if it is a postback. Is there a more efficient way in doing so in ASP.net?

Thank you all.

  • 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-10T15:02:05+00:00Added an answer on June 10, 2026 at 3:02 pm

    Assuming ASP.NET WebForms:

    If you need your code to be ran when a button is clicked, you should add your code into your button’s click event handler.

    <asp:button id="btn" runat="server" text="Submit" onclick="btn_Click" />
    
    protected void btn_Click(object sender, eventargs e){
       //code here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

ASP.NET newbie here. When on a page I'd like to set the corresponding menu
newbie to asp.net here. I am trying to setup a selectparameters and controlparameters based
Newbie here, I havn't done much membership stuff for asp.net. I am trying to
ASP.NET newbie here I have coded up an ASP.NET website and running on win'08
I am a newbie to ASP.NET MVC (v2), and I am trying to use
ASP.NET newbie here. I would like to create a form with multiple types of
I'm a newbie to asp .net and c# world. I'm trying to insert a
I'm a newbie in ASP.net MVC 3. I'm trying to do something trivial, but
I'm newbie developing with asp.net mvc 4, when I edit one of my models
.NET newbie here. I have a page with a number of sections to it.

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.