Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP.Net master page and forms

Status
Not open for further replies.

wbodger

Programmer
Apr 23, 2007
769
0
0
US
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

Code:
<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!

Willie
 
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.
 
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.
 
Oh yeah, that is what I keep forgetting, asp.net forms always postback by default. Thnaks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top