user controls

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a user controls called header.ascx and footer.ascx.. on the
header.ascx control i want to put a button that calls a method in another
page called details.aspx.

How is this possible? also how can you call a method in another page from a
different page.. eg: i want to call a method in the page x.aspx from page
y.aspx

Many Thanks in advance.
 
Huzz,

You cannot. A page exist in the client as one page.
It is not a windowsform way of using that.

However when you want to do functions which you want to do in your complete
application, than you can make a seperated (shared/static) class for that,
which holds the methods you want to do.

Something as the sample bellow.

\\form class
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
butt.colorbut(Me.Button1)
End Sub
End Class
Friend Class butt
Friend Shared Sub colorbut(ByVal but As Button)
but.BackColor = Color.Red
End Sub
End Class
///

I hope this helps?

Cor
 
Back
Top