473,414 Members | 1,692 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

mulitple html forms on one ASP.Net page?

Hi,

I want mulitple html forms on one ASP.Net page. I guess it's invalid HTML
to nest form elements, which is okay for me.

My concern is that ASP.Net will not work well if I override the creation of
form elements on the aspx page.
I appreciate button postback events would normally post back to the main
form the the page.

My aspx page would look like this:
....

<form id="Form1" method="post" runat="server">
<!-- main form ASP.Net controls-->
</form>
<!-- user control containing datagrid -->
<asp:datagrid runat="server" ... >
<asp:TemplateColumn>
<ItemTemplate>
<form action="someother.aspx">
<!-- form controls -->
</form>
</ItemTemplate>
</asp:TemplateColumn>
</asp:datagrid>

Thanks
Martin
Nov 18 '05 #1
2 1124
Martin Hi,

your server side control must be inside server side Form and you can
have just one server side Form. but you can create regular HTML form
that contain HTML controls and set those forms actions as you like.

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
Thanks Natty,

Unfortunately, that doesn't help me as the datagrid which contains the form
data is a server side control.

Here is the bigger problem I am trying to solve - perhaps I'm approaching it
the wrong way... (could you advise?)

I've got a page Detail.aspx which is used for creating, viewing, & editing
business objects.
This page takes different url params according to if the item is to be
created, or already exists.
Once created in this page, I display the created item in that page. At this
point the url to the page should change to reflect the created status of the
object. So doing a server.transfer() is no good as I inherit the old url.
Currently I solve this by simply doing a redirect, but this is ineffiicient
for my page processing, so I hoped putting the url args in form data instead
the url would help me.
But then I hit the problem of accessing created business objects from the
page I outlined with multiple forms.

I'm sure there must be a design pattern for this.

Thanks
Martin

"Natty Gur" <na***@dao2com.com> wrote in message
news:OR**************@TK2MSFTNGP12.phx.gbl...
Martin Hi,

your server side control must be inside server side Form and you can
have just one server side Form. but you can create regular HTML form
that contain HTML controls and set those forms actions as you like.

HTH

Natty Gur[MVP]

blog : http://weblogs.asp.net/ngur
Mobile: +972-(0)52-8888377
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
3
by: Molly J. Fagan | last post by:
Hello-- I'm using forms authentication and have 2 web projects located under the same root directory. In the web.config of the second project, I have <authentication mode="Forms"> <forms...
5
by: Dave H | last post by:
I have an asp:listbox, allowing multiple selections, is there a quick check to see if there's more than one selected, or do I need to go through the whole list? Thanks, Dave
6
by: William F. Zachmann | last post by:
We've got a project going that involves moving an old web site with a massive dll written in C++ that produces most of the output from a SQL 7.0 data base on NT4 onto IIS on Windows 2003 Server...
2
by: jackson2005 | last post by:
OK, I need to do three different things. On the ONLOAD event I would like a popup box to open. In this popup box I need two text boxes. One for the UserName and one for the BillingTo name. ...
5
by: nick | last post by:
I need to create a simple asp.net application that use password protect some html pages. The html page provider doesn't know asp.net. And the host doesn't allow me to create user accounts. ...
7
by: thersitz | last post by:
I can't seem to get my html form to submit properly from within a web form. Here's my form tag syntax and some delivery hidden fields. <form id="myForm"...
19
Atli
by: Atli | last post by:
Introduction At some point, all web developers will need to collect data from their users. In a dynamic web page, everything revolves around the users input, so knowing how to ask for and collect...
1
by: budyerr | last post by:
All, I am trying to build a email submission form using asp.net. I currently have a web form page that will upload to my webhosting server, attach to email then delete the file after sending. ...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.