I have a master page, sub master page and content page.
The master page has a form control which both masters can access by name alone:
The content page contains a contact form, with the form tags removed as they conflict with the form tags on the master.
<form id="form1" runat="server">
What I want to do now is access form1 on the content page so I can change its properties for use in the contact form. I'm not sure if this is how its done in ASP? Anyway, here's how I've tried to:
If someone can advise me please that would be great as I've been on this for ages.
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim f As Control = CType(Master.FindControl("form1"), Control)
f.Action = Request.Url.ToString()
f.Name = "contactForm"
f.Method = IsPostBack