MultiView Contrtol will not work in content page
I am fairly new to asp.net programming but have been doing OK. I have hit on an issue that I can't find a solution for. I have a Master Page that has a TreeView for navigation via the Web.sitemap file. This control reequires a <form id="form1" runat="server"> in the MasterPage. In one of my content pages that uses the MasterPage I want to use a MultiView control. The Multiview control also requires a <form id="form1" runat="server">. If I try to put the "form id" in the content page it throws an error that only one <form id="form1" runat="server"> is allowed. If I leave it out the MultiView control won't work at all. Does anybody have any ideas or is this "just one of those things" you have to live with?
5 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Rakrus105 pointsPosted Feb 7, 2008, 1:13 AM EST
In the content page by default it won't create any form element.If you created any form element just remove it,any way it inherits the master page form element.
Martin Delfino4 pointsPosted Feb 7, 2008, 7:18 AM EST
I have tried that but when I click on one of my view buttons I get the error "the page cannot be displayed". I have taken the code out of the "content page" and made a simple page without reference to a master page, of course I have to add in the form id but everything works just fine. It simply appears that for some reason my content page will not inherit the form id from the master.
Thanks for replying
Martin Delfino4 pointsPosted Feb 7, 2008, 7:55 AM EST
Rakrus105 pointsPosted Feb 7, 2008, 7:53 PM EST
Hi,
we can use Request.QueryString["parameterName"].ToString() to get the parameter associated with the url.Please check for this.
Martin Delfino4 pointsPosted Feb 8, 2008, 7:22 AM EST
That took care it. Everything is working just as I hoped it would.
Many thanks!!!