Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ASP.Net master page and forms

ASP.Net master page and forms

ASP.Net master page and forms

I am new to .net after having been in classic asp for the past 16 or 17 years. I have created a new web forms application and I see that the Master page has


<form runat="server"> 

Now, when I want to use a form in any of my pages, where/how do I put in the actual action for that form since it will not allow me to have more than one form with runat="server"? Do I just do a form and not designate runat="server" because that was already designated in the Master page?

Thanks for the help!


RE: ASP.Net master page and forms

If you are using a master page, you create content pages that go inside of them.
Create a new webform that uses(inherits) the master page.

Check examples online. There are many out there..

You don't need to specify actions in .NET. It is done for you in the background. Once you create a page, you can view the source and you will see the action.

RE: ASP.Net master page and forms

By default action is original page. All .aspx pages posted data to yourself, on button or link or whatever element click or change you need to post data to server you just specifying which function to call when data posted back, so you do not need to set additional form tags.

RE: ASP.Net master page and forms

Oh yeah, that is what I keep forgetting, asp.net forms always postback by default. Thnaks!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close