Advertisement

03.12.2007 at 07:12AM PDT, ID: 22443299
[x]
Attachment Details

Having buttons on MasterPage: not sure why this example isnt working

Asked by Farzadw in Programming for ASP.NET, Miscellaneous Programming, .NET

Tags: , , ,

I want to have a cancel button in my Master page. This button will be on every page. So found this example:
http://professionalaspnet.com/archive/2007/01/11/Handling-Master-Page-Click-Events-in-the-Content-Page.aspx

Not sure why mine doesnt work;
1. In MasterPage I have:
 <asp:Button ID="btnCancel" runat="server" CssClass="Button" Text="Cancel" />

2. Added this property in Design.Master.VB
Public Partial Class Design
    Inherits System.Web.UI.MasterPage
   Public ReadOnly Property btnCancelms() As Button
       Get
           Return btnCancel
        End Get
    End Property
....

3. In Search.aspx I have:
 Dim msPage As Design = CType(Master, Design)
        If Not IsNothing(msPage) Then
            AddHandler msPage.btnCancelms.Click, AddressOf btnCancelms_Click
        End If

 ...
 Protected Sub btnCancelms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)    
     .....  
    End Sub

*****with that, I cant compile the code. I get this error:
Unable to copy file "XXX" to "bin\XXX.dll". The process cannot access the file 'XXX' because it is being used by another process.

What am I missing?Start Free Trial
[+][-]03.12.2007 at 07:56AM PDT, ID: 18702444

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 09:27AM PDT, ID: 18703328

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 09:30AM PDT, ID: 18703356

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 09:36AM PDT, ID: 18703425

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 09:44AM PDT, ID: 18703504

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 09:44AM PDT, ID: 18703513

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 09:51AM PDT, ID: 18703573

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 09:56AM PDT, ID: 18703621

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 12:32PM PDT, ID: 18705017

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 12:38PM PDT, ID: 18705084

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 01:04PM PDT, ID: 18705305

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 01:38PM PDT, ID: 18705613

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 01:59PM PDT, ID: 18705783

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 03:04PM PDT, ID: 18706234

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 03:11PM PDT, ID: 18706281

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 03:24PM PDT, ID: 18706347

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 04:29PM PDT, ID: 18706613

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 04:33PM PDT, ID: 18706621

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Programming for ASP.NET, Miscellaneous Programming, .NET
Tags: addhandler, copy, file, masterpage
Sign Up Now!
Solution Provided By: Tanglin05
Participating Experts: 2
Solution Grade: A
 
 
[+][-]03.12.2007 at 04:39PM PDT, ID: 18706646

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 04:51PM PDT, ID: 18706689

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 04:55PM PDT, ID: 18706703

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 05:00PM PDT, ID: 18706750

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]03.12.2007 at 05:04PM PDT, ID: 18706768

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]03.14.2007 at 04:01PM PDT, ID: 18722956

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32