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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:42:35+00:00 2026-05-25T11:42:35+00:00

I have a custom control which is a combination of textbox and button (a

  • 0

I have a custom control which is a combination of textbox and button (a search control). One of its attribute defined is used to identify its position (whether in Master or Content page so that we make the search settings) that is PageName. Initially this was declared as string property as:

public string PageName
{
    set;
    get;
}

But since we had some issues with case sensitivity. We changed this as enum, so that users will not enter any random things avoiding the exceptions. So this is now changed to:

public enum PageNameProperty { MasterPage , SearchResultsPage, MLIPage };

public PageNameProperty PageName
{
   set;
   get;
}

But now we are getting the error as :

Method not found:’Void UI.SearchTextBox.set_PageName(System.String)’.
Inner Exception (Level 1)

Note: Now i cannot force users to change this to PageName.Master or anything else, since they cannot modify the code for current release but can only install our control, so the projects would refer the new DLLs.

I need some solution apart from replicating the property type back to string before the current release.

Please help.

  • 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-25T11:42:36+00:00Added an answer on May 25, 2026 at 11:42 am

    You changed the signature (return type for instance) of a property. Calling code will fail as they won’t find the signature they are expected.

    You should keep the original property, mark it as obsolete, and create a new one like this :

    [Obsolete("User PageName2")
    public string PageName {
    {
     get { return PageName2.ToString(); }
    set { PageName2 = (PageNameProperty )Enum.Parse(typeof(PageNameProperty), value);
    }
    
    public PageNameProperty PageName2 { set; get; }
    

    This will keep compatibility with former use, while incitating the use of the new one.

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

Sidebar

Related Questions

I have a custom control, a range slider, which is used in one of
I have a custom search control on my page (asp.net) which contains a textbox
I have made one custom user control (search text box), which basically consists of
I'm trying to create a custom control - a button - which will have
I have a custom control which is used on many pages. I am making
I have created a simple Asp.Net custom control which automatically combines all the correct
I want to double buffer a custom control which contains buttons. I have tried
I have a custom control which needs to configure a MultiBinding in code, which
I have a custom control which is rendered as a hyperlink: Public Class TestControl
I have a custom control which contains a panel, of which I want to

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.