Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9017739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:21:01+00:00 2026-06-16T04:21:01+00:00

I learned that in umbraco, we have to use a master template for a

  • 0

I learned that in umbraco, we have to use a master template for a custom user control. I have a custom form and a submit button. I created a control that sends an email once the ‘submit” button is pressed. the control basically gets all the fields like name, address. It works when I create a new template and insert the macro.

However when I try to use it with a master template, it does not work. The submit button refreshes the page but never goes to my c# part where it sends the mail

and if I do this

     <form name="myform" target="_self" method="post" action="index">

it goes to the index page, but no email is sent.

But it works on a clean or new template. Is there a way to use custom control with master template in umbraco 4
EDIT –
This is how I am using macro

<form name="myform" target="_self" method="post" action="index">    
   <umbraco:Macro Alias="sendMail" runat="server"></umbraco:Macro>
</form>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T04:21:02+00:00Added an answer on June 16, 2026 at 4:21 am

    Looking at the code it looks like you are missing the runat="server" attribute on the form tag.

    <form name="myform" runat="server">    
       <umbraco:Macro Alias="sendMail" runat="server"></umbraco:Macro>
    </form>
    

    By using the runat=server attribute the form tag will be rendered with the correct attributes. Note you can only have one runat="server" form on a page.

    There’s some more information on this concept on W3Schools

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I learned that when executing commands in Python, I should use subprocess. What I'm
I recently learned that all stl containers have swap function: i.e. c1.swap(c2); will lead
I have learned that Windows uses UTF-16LE on x86/x64 systems. What about Linux? Which
I have learned that when using android:entries with a ListView , it uses android.R.layout.simple_list_item_1
I have recently learned that sql server 2005 does not support UTF8: UTF8 problem
I just learned that I could use chmod make myscript.sh executable and the run
Edit: Ok so I learned that I guess I need an distributed source control,
I have learned that SO has put questions and answers in the same table.
I learned that how to dynamically add input fields to a form by using
I have learned that builds should be very straight forward and requires less human

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.