473,325 Members | 2,442 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Reference ContentPlaceHolder

13
I am trying to reference a dropdownlist in the contentplaceholder 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 contentplaceholder.

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

Select Case Request.Form("DropDownList1")
Case "Health Insurance"
Server.Transfer("Default2.aspx")
Case "Group Health Insurance"
Server.Transfer("Group_Health.asp")
Case "Medicare Suppliments"
Server.Transfer("Medicare_Suppliments.asp")
Case "Life Insurance"
Server.Transfer("Life_Insurance.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.
Mar 29 '07 #1
4 1544
kenobewan
4,871 Expert 4TB
Are you using visual basic or visual basic.net? Please provide more info. Thanks.
Mar 29 '07 #2
mlg74
13
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.
Mar 29 '07 #3
mlg74
13
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....
Mar 29 '07 #4
kenobewan
4,871 Expert 4TB
Please post your onsubmit code from your default page. Thanks.
Mar 31 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Billy Cormic | last post by:
Hello, I am using Visual Studio 2005 Beta for the first time and am having trouble using contentplaceholders. Actually, I am having trouble declaring them. Here is a snap shot of my master page:...
0
by: Abraham Andres Luna | last post by:
i have a master page: <%@ Master Language="C#" %> <html> <head> <title>CRM - RDK Truck Sales & Service</title> </head> <body> <form runat="server"> <asp:contentplaceholder...
7
by: Andrew Mercer | last post by:
I am getting the above error when attempt to set the src, height and width of an iframe in C# code. I am using this as an attempt to dynamically alter the image displayed in the iframe tag of an...
0
by: nickster | last post by:
For some reason when I use asp controls for the default content of a ContentPlaceHolder, they do not get rendered. Static content is rendered just fine however! Specifically I'm using multiple...
2
by: Andrew Robinson | last post by:
I would like to use a ContentPlaceHolder within the following. Any ideas on how to best accomplish this? <td rowspan="2" style="width: 600px; background-image: url('<asp:ContentPlaceHolder...
13
by: Dan Aldean | last post by:
Hi, I use ASP.NET 2.0 and I created a stylesheet, but I don't know how to make it visible to a web form "MyWebPage.aspx" that uses the master page. I put a reference to the css in the .master...
3
by: jobs | last post by:
Hello. I have a master page with ContentPlaceHolder under a html Div tag. That DIV tag has CSS that positions it. While in Visual Studio design view, that div tag and contentplace holder does...
1
by: =?Utf-8?B?ampmbGFzaA==?= | last post by:
I have a master page with a contentplaceholder object. When creating content pages, I'm adding controls to the contentplaceholder area. The contentplaceholder is not stretching so that I can...
1
by: mil111 | last post by:
Hi, Can anybody help me? I created master page (in table) with header, footer, left column and in the right column is contentPlaceHolder. Content on contentPlaceHolder is longer than the left...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.