Click here to Skip to main content
15,920,508 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: bypass web filter Pin
gavindon23-Mar-11 9:27
gavindon23-Mar-11 9:27 
GeneralRe: bypass web filter Pin
GenJerDan25-Mar-11 3:23
GenJerDan25-Mar-11 3:23 
GeneralRe: bypass web filter Pin
gavindon25-Mar-11 3:45
gavindon25-Mar-11 3:45 
GeneralRe: bypass web filter Pin
GenJerDan25-Mar-11 3:47
GenJerDan25-Mar-11 3:47 
GeneralRe: bypass web filter Pin
gavindon25-Mar-11 8:25
gavindon25-Mar-11 8:25 
GeneralRe: bypass web filter Pin
GenJerDan25-Mar-11 8:29
GenJerDan25-Mar-11 8:29 
GeneralRe: bypass web filter Pin
gavindon25-Mar-11 8:31
gavindon25-Mar-11 8:31 
QuestionHandle master page button(s) click events on content page Pin
De_Novice23-Mar-11 6:13
De_Novice23-Mar-11 6:13 
I have a master page ( masterpage.master) that has 2 link buttons lnkbtn_save and lnkbtn_edit. I have 2 content pages ( product and customer). When the user is on customer.aspx and clicks the lnkbtn_edit I want the controls on the customer page to be enabled and when the user clicks lnkbtn_save, I want the customer data to be saved. Basically the linkbuttons click event needs to be handles in the content page.

learning for the fist process in this video ()[^] I could create a click event for one link button. How would I do this for two buttons.

Here is my code:--

masterpage.aspx.vb
Partial Class MasterPage
    Inherits System.Web.UI.MasterPage
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub lnkbtn_save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LinkButton1.Click

    End Sub

    Public ReadOnly Property Masterbtnsave() As LinkButton
        Get
            Return lnkbtn_Save
        End Get

    End Property
End Class   



customer.aspx.vb

Partial Class customer
    Inherits System.Web.UI.Page

    Protected Sub Masterbtnsave_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        MsgBox("from customer page")
    End Sub
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        AddHandler Me.Master.Masterbtnsave.click, AddressOf Masterbtnsave_Click

    End Sub
End Class 


My question is: in the masterpage code behind I am returning the actual name of the lnkbutton in the property, how can I make this such that it returns the name of the button that was clicked. And then in the content page based on the button that was clicked some code is executed.

Any help will be appreciated
AnswerRe: Handle master page button(s) click events on content page Pin
De_Novice23-Mar-11 6:19
De_Novice23-Mar-11 6:19 
QuestionMaskedEdit extender and special characters Pin
Peterson Luiz23-Mar-11 5:03
Peterson Luiz23-Mar-11 5:03 
QuestionPaste data from excel Pin
Hum Dum22-Mar-11 23:00
Hum Dum22-Mar-11 23:00 
AnswerRe: Paste data from excel Pin
Dalek Dave23-Mar-11 5:03
professionalDalek Dave23-Mar-11 5:03 
AnswerRe: Paste data from excel Pin
Pavel Yermalovich23-Mar-11 22:47
Pavel Yermalovich23-Mar-11 22:47 
QuestionHow to save data and retrieve data from database using two tables in gridview? Pin
snamyna22-Mar-11 21:55
snamyna22-Mar-11 21:55 
AnswerRe: How to save data and retrieve data from database using two tables in gridview? Pin
ktrrzn5-Apr-11 19:32
ktrrzn5-Apr-11 19:32 
GeneralRe: How to save data and retrieve data from database using two tables in gridview? Pin
snamyna6-Apr-11 14:35
snamyna6-Apr-11 14:35 
AnswerRe: How to save data and retrieve data from database using two tables in gridview? Pin
ktrrzn6-Apr-11 15:12
ktrrzn6-Apr-11 15:12 
GeneralRe: How to save data and retrieve data from database using two tables in gridview? Pin
snamyna6-Apr-11 19:13
snamyna6-Apr-11 19:13 
QuestionHow to Convert ASP.NET web application to ASP.NET Web Service Application Pin
VenkataRamana.Gali22-Mar-11 20:51
VenkataRamana.Gali22-Mar-11 20:51 
QuestionAccess content page procedure from master page button Pin
De_Novice22-Mar-11 6:50
De_Novice22-Mar-11 6:50 
AnswerRe: Access content page procedure from master page button [modified] Pin
Not Active22-Mar-11 7:47
mentorNot Active22-Mar-11 7:47 
GeneralRe: Access content page procedure from master page button Pin
De_Novice22-Mar-11 7:55
De_Novice22-Mar-11 7:55 
GeneralRe: Access content page procedure from master page button Pin
Not Active22-Mar-11 8:02
mentorNot Active22-Mar-11 8:02 
GeneralRe: Access content page procedure from master page button Pin
De_Novice22-Mar-11 8:08
De_Novice22-Mar-11 8:08 
GeneralRe: Access content page procedure from master page button Pin
Not Active22-Mar-11 8:28
mentorNot Active22-Mar-11 8:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.