Results 1 to 4 of 4

Thread: multiple form in one aspx page

  1. #1

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    8

    multiple form in one aspx page

    I've been trying to include few form in one aspx page, but it keep prompt out error saying there can be only one runat server form in a page, is there any solution to this other than using frame?

  2. #2
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    First of all ask yourself why you need a second form. With asp.net's event model you should not need to have a second form as every control can raise it's own event and thereby not call any other procedure.

  3. #3

    Thread Starter
    New Member
    Join Date
    Oct 2002
    Posts
    8
    I was developing this thing that i need to include sidebar and banner in my page, those 2 were created by my collegeaus in webforms. That's why i must include them to my page.

  4. #4
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    Dublin, Ireland
    Posts
    262
    If you need to include stuff use user controls. Anything on a user control can have it's own event code.
    I might dare to suggest you read a bit more about asp.net somewhere somehow because it might demonstrate to you how you can do things the way you intend without using multiple forms. Remember the error you are getting is because you have more than one form tag in your page:-

    <form blah="blah"></form>.....
    <form blah="blah"></form>

    not because you are trying to inlude pages.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width