Reference ContentPlaceHolder

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mlg74
    New Member
    • Mar 2007
    • 13

    #1

    Reference ContentPlaceHolder

    I am trying to reference a dropdownlist in the contentplacehol der of my project, in order to redirect users to the proper page, depending on what they select on the default page. Visual Basic Please.

    On the default.aspx page I have a dropdownlist, a textbox and a submit button, which is set to postback to "redir.aspx ", all inside contentplacehol der.

    On the redir.aspx page, I have typed in the page load Sub:

    Select Case Request.Form("D ropDownList1")
    Case "Health Insurance"
    Server.Transfer ("Default2.aspx ")
    Case "Group Health Insurance"
    Server.Transfer ("Group_Health. asp")
    Case "Medicare Suppliments"
    Server.Transfer ("Medicare_Supp liments.asp")
    Case "Life Insurance"
    Server.Transfer ("Life_Insuranc e.aspx")
    End Select

    This works perfectly on my test site, which does not use master pages. I did that just to see if it would work and it did. But I really want it to work with master pages.

    Can anyone help in Visual Basic? Thank you.
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Are you using visual basic or visual basic.net? Please provide more info. Thanks.

    Comment

    • mlg74
      New Member
      • Mar 2007
      • 13

      #3
      Well I'm not sure. I'm using Visual Web Developer 2005 Express, and created an ASP.NET website, using Visual Basic as the language. Hope that answers your question.

      Comment

      • mlg74
        New Member
        • Mar 2007
        • 13

        #4
        More on the problem: When I click submit, it takes me to the redir.aspx page and stays there. It is not reading the "select" script written to server.transfer to the different pages. I think because it does not recognize the dropdownlist due to the master pages in the way....

        Comment

        • kenobewan
          Recognized Expert Specialist
          • Dec 2006
          • 4871

          #5
          Please post your onsubmit code from your default page. Thanks.

          Comment

          Working...