Skip to content

MultiView Contrtol will not work in content page

Martin Delfino

Asked Feb 5, 2008, 9:03 AM EST5 answers
Share
LinkedInX
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.

  • 0
    Hi,
    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.
    0
  • 0

    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

    0
  • 0
    I think I have stumbled onto the problem.  The page I am having trouble with has an incomining parameter.  In the pageload event I populate a text box with this parameter as follows: inLoan.Text = (Request.PathInfo).Substring(1);  If I comment this line out and hard code a value to the textbox (which is used for SQL selection) the multiview control works fine.  So, as I originally said I am new to asp.net - is there some other way to pass and receive parameters between pages the will allow me to use the multiview control?
    0
  • 0

    Hi,

    we can use Request.QueryString["parameterName"].ToString() to get the parameter associated with the url.Please check for this.

    0
  • 0

    That took care it.  Everything is working just as I hoped it would.

    Many thanks!!!

    0