Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2005

Tip: Looking for answers? Try searching our database.

multiple forms on one page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pint - 19 Jul 2005 02:22 GMT
I have a simple web user control. I'd like for this form to appear twice
on a single aspx page. How do I get around the problem of having more
than one <form runat=server> tag?

More background: the user control is a login box. For design reasons I
want the box to be available in the header as well as the bottom of the
page.

Thanks,
Pint
Craig Deelsnyder - 19 Jul 2005 03:01 GMT
> I have a simple web user control. I'd like for this form to appear twice  
> on a single aspx page. How do I get around the problem of having more  
[quoted text clipped - 6 lines]
> Thanks,
> Pint

Don't define the form in your usercontrol; I assume that's what you're  
doing.  Usually you leave form definition to the page itself, for this  
reason.

Signature

Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET

Pint - 19 Jul 2005 05:10 GMT
>> I have a simple web user control. I'd like for this form to appear
>> twice  on a single aspx page. How do I get around the problem of
[quoted text clipped - 10 lines]
> doing.  Usually you leave form definition to the page itself, for this  
> reason.

Thanks for your reply, but this did not address my question.

I understand that using a single form works. What I am trying to learn
is if anyone knows a way to allow for two or more forms on a single aspx
page. One use of this would be to allow a login form on every page, even
pages that have an entirely different form on them.
It would be nice to put the implementation of the login form in a user
control so that it could easily be incorporated into every page. Your
solution does not allow for this abstraction.
Thanks,
Pint
Rakesh Rajan - 19 Jul 2005 08:21 GMT
Hi,

You can have multiple runat=server forms in one aspx provided only one is
visible at a time, which thus is not useful for your problem.

I am still confused as to why you require to have form tags in your user
control. You could have the whole login logic in the user control and put
multiple instances of the user control in the same web form, right?

Signature

HTH,
Rakesh Rajan
MVP, MCSD
http://www.msmvps.com/rakeshrajan/

> >> I have a simple web user control. I'd like for this form to appear
> >> twice  on a single aspx page. How do I get around the problem of
[quoted text clipped - 22 lines]
> Thanks,
> Pint

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.