I have coded a .ASPX file that includes several forms. When the page is loaded, I use the query string to determine which form should be visible and set the visible property on all the other forms to false.
This seemed to work fine when all the code was in-line and I was developing this as a stand-alone file. However, I have now brought the file into a project and split the code to generate a 'Code Behind' file. I get an error when I run the project:
"A page can only have one server-side Form tag"
I got the same error once or twice when developing the stand-alone file - usually because my logic was such that I'd incorrectly left more than one form visible. Before I start investigating whether my logic is again at fault I'd be interested in knowing if what I'm trying to do is illegal or bad practice in the project(/compiled?) environment. The development environment flags no errors in the code.
I guess I could have a single form and group the controls in different panels then control the visibility by enabling only the appropriate panel if this resolves the problem.
This seemed to work fine when all the code was in-line and I was developing this as a stand-alone file. However, I have now brought the file into a project and split the code to generate a 'Code Behind' file. I get an error when I run the project:
"A page can only have one server-side Form tag"
I got the same error once or twice when developing the stand-alone file - usually because my logic was such that I'd incorrectly left more than one form visible. Before I start investigating whether my logic is again at fault I'd be interested in knowing if what I'm trying to do is illegal or bad practice in the project(/compiled?) environment. The development environment flags no errors in the code.
I guess I could have a single form and group the controls in different panels then control the visibility by enabling only the appropriate panel if this resolves the problem.