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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:27:26+00:00 2026-05-16T12:27:26+00:00

On my master page , I have Search textbox and Search Button. On My

  • 0

On my master page , I have “Search textbox” and “Search Button”.

On My content page , I have a “User Control” which has a “GridView”.It shows some data about Vendors.
Also, on this User Control’s Page Load, i have code written to display all vendors in GridView.

Now, when user enters Vendor Number in “Search textbox” , and hits “Search Button” , i want to handle this event inside my User Control.

How to do this ?

Please help me. Thanks in advance.

Note : i know how to handle the event in content page but not sure how to handle it inside user control placed on content page.

  • 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-16T12:27:26+00:00Added an answer on May 16, 2026 at 12:27 pm

    You just need to add logic that passes in the Search Parameters to the User Control.

    On the User Control, make a public method to Bind the grid that takes in the search text

    public void BindGrid{string searchText)
    {
       //get datasource with the searchText used as a Where, or whatever suits your current situation
       //bind grid
    }
    

    Then, on the MasterPage, you should have something like

    protected void btnSearch_Click(object sender, EventArgs e)
    {
       UserControl1.BindGrid(tbSearchText.Text);
    }
    

    You just need to make sure that your UserControl doesn’t bind data on the PageLoad event if IsPostBack is true. Otherwise, you’ll be binding data twice.

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

Sidebar

Related Questions

I have a master page which has a content section with the id cpMainContent.
I have a search field and button on my master page. When a user
In my application i have master page and content page.In my master have search
I have a master page that contains a search box which is validated as
I have a master page and have included a search text box. User is
I have a custom control which is a combination of textbox and button (a
In my .aspx page which derives from a master page I have a contact
We are using Sharepoint 2007 In which on master page we have Asp Image
I have a master page called SampleMaster.master and this page contains a Repeater control
I have a master page with Header, Menu, Content and Footer panes in my

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.