button is not declared

Posted on 2007-07-30
Last Modified: 2008-01-09
I have created master page and put scriptmanager in it. Then creted default.aspx and get the masterpage content. But if I want to place a button in my default page, it is saying not declared, even though it is declare on the aspx page. THis is my first experience with script manager with master page and default page relation. What I need to do?
Question by:jaws1021
    LVL 9

    Expert Comment

    Did u checked that whether button object is created on the code-behind file??


    Chirag Patel

    Author Comment

    I put button on the aspx page and try to say on the server side button1.backcolor = .. it is highlighting red button1 is not declared. What else I need to do?
    LVL 9

    Accepted Solution

    First close all the files then open only aspx page and first remove the button from the page, save it.
    Then again add a new button and name it as you wish and then Press F7 it will open the codebehind file and now check whether the button object has been created or not.


    Chirag Patel

    Author Comment

    believe or not it dissappeared without doing anything.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    If I have to fix slow responding website my first thoughts are server side optimizations: the database may not be optimized or caching is not enabled, or things like that. We often overlook another major part of our web application: the client. We o…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    This video teaches users how to migrate an existing Wordpress website to a new domain.
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now