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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:44:50+00:00 2026-06-12T23:44:50+00:00

I fill some controls with data from data base, by calling a select method

  • 0

I fill some controls with data from data base, by calling a select method

and I change the values to update it, but when I press update button, it takes the values that called at the page load, and ignore all changes.

how can I avoid this ?

thanks in advance : )

here is a simple code to present my problem

SelectBLL _selectbll;
string _title = string.Empty;
string _details = string.Empty;


#region Page Load
protected void Page_Load(object sender, EventArgs e)
{
    GetUMedicineDetails();
}
#endregion

#region Get UMedicine Details
private void GetUMedicineDetails()
{
    _selectbll = new SelectBLL();
    _selectbll._GetUMedicineDetails(Request.QueryString[0].ToString(), ref _title, ref _details);
    #region Bind Controls
    txtdetails.Text = _details;
    txttitle.Text = _title;
    #endregion
}
#endregion

#region Update Button
protected void btnupdate_Click(object sender, EventArgs e)
{
    _UpdateUMedicine();
}
#endregion

#region UpdateU Medicine
public void _UpdateUMedicine()
{
    _updatebll = new UpdateBLL();
    _updatebll._UpdateUMedicine(
        Convert.ToInt32(Request.QueryString[0]), txtdetails.Text, txttitle.Text);
}
#endregion
  • 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-12T23:44:51+00:00Added an answer on June 12, 2026 at 11:44 pm

    Page.IsPostBack Property: Gets a value that indicates whether the page is being rendered for the first time or is being loaded in response to a postback.

    protected void Page_Load(object sender, EventArgs e)
    {
    
        if (!IsPostBack)
        {
            GetUMedicineDetails();
        }
    }
    

    Also, Refer:

    How to: Determine How ASP.NET Web Pages Were Invoked

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

Sidebar

Related Questions

I'm trying to fill some data from an xml feed we made into my
i have a DataGridView on the Form. I select some data from database and
I want to get some data to fill a listview control, but this data
A Slider and some other controls won't stretch to fill available space when placed
This will probably be just another unsolved thread but i'll fill in some info
I want to use jquery to automatically fill some details in a web site
I've created a page which asks user to fill some form fields and when
I extended JDialog to create a custom dialog where the user must fill some
I am getting this error. I am using ICallbackEventHandler to fill the some dropdowns.
For some reason when I generate this using jquery to fill in my table.

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.