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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:39:51+00:00 2026-05-20T07:39:51+00:00

Background I have the following code that is supposed to refresh data when a

  • 0

Background

I have the following code that is supposed to refresh data when a button called refresh is clicked.

public static void refreshBaan()
{
    SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
    SqlCommand comm = new SqlCommand("sp_start_job", conn);
    SqlParameter jobname = new SqlParameter("job_name", "EBS");
    SqlParameter servername = new SqlParameter("server_name", "bnvmsql0a610912");
    comm.Parameters.Add(jobname);
    comm.Parameters.Add(servername);
    comm.CommandType = CommandType.StoredProcedure;
    conn.Open();
    comm.ExecuteReader();
    conn.Close(); `
}

I have an Updatepanel that I want to show when clicked, so naturally I want to put in Updatpanel1.visible = true; in the above statement, but it doesn’t let me.

Question

How can I refresh the data using an updatepanel? Where do I need to instantiate that update panel?

  • 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-05-20T07:39:52+00:00Added an answer on May 20, 2026 at 7:39 am

    You can only access instance members of a class in non-static methods.

    I would suggest creating a click handler specifically for the button such as:

    protected void refresh_Click(object sender, EventArgs e)
    {
        updatePanel1.Visible = true;
        refreshBaan();
    }
    

    where the button declaration looks something like:

    <asp:Button ID="refresh" runat="server" OnClick="refresh_Click" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code that adds a background worker into a VB.net WPF
Imagine I have the following code that runs as a background processor for an
I have the following code that is used to switch background images on different
I have the following code: JS Fiddle I want that on hover the background
i have the following simple code, but it doesn,t work <ul> <li id=one onmouseover=this.style.background-color='white';>
First, a little background. I have strings that resemble the following: ((Foo.Bar.StartsWith(A)) && (Foo.Bar.EndsWith(B)))
I have the following code example (see below). My problem is that the tooltip
I have the following code in my stylesheet... body { background-image:url('Background.png'); } td.Header {
This one's stumped me. So I have the following sample app that is supposed
I have the following code (on a xhtml page) <div style=background-color:#006400;> <div id=div1 style=display:inline-block;

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.