Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

master pages-controls disappearing

Status
Not open for further replies.

zma

Programmer
May 30, 2006
25
US
I HAVE A MASTER PAGE CALLED TRY1.MASTER THAT CALLS THE PAGE PAT.ASPX THAT GOES IN THE PLACEHOLDER "FLOWERTEXT".
PAT.ASPX CALLS MIDDLE.ASPX THAT GOES IN THE PLACEHOLDER
"NEXTPLACE". WHEN IT DOES THIS, THE CONTROLS IN PAT.ASPX DISAPPEAR.

HOW CAN I KEEP THEM FROM DISAPPEARING?

---------------------------------------
BELOW IS PART OF WHAT IS IN TRY1.MASTER
---------------------------------------

<form id="form1" runat="server">
<table>
<tr valign="top">
<td rowspan="2">
<a href="PAT.ASPX">
Patient
</a>
<br/>
<a href="prv.aspx">
Provider
</a>
<br/>
</td>
<td>
<asp:contentplaceholderid="FLOWERTEXT" runat="server">
</asp:contentplaceholder>
</td>
</tr>
<tr>
<td>
<asp:contentplaceholder id="NEXTPLACE" runat="server">
nextplace contents
</asp:contentplaceholder>
</td>
</tr>
</table>
</form>

-----------------
BELOW IS PAT.ASPX
-----------------
<%@ page language="VB" masterpagefile="~/try1.master" %>

<script language="vb" runat="server">
sub a(sender as object,
e as System.Web.UI.WebControls.CommandEventArgs)
dim b as string
dim dbf as string
dim findby as string
SERVER.TRANSFER("middle.aspx? b="+textbox1.text.tostring() +"&dbf="+dropdownlist2.selecteditem.value+ _
"&findby="+dropdownlist1.selecteditem.value,true)
end sub
</script>

<asp:content id="Content1" contentplaceholderid="FLOWERTEXT" runat="server">

<asp:DropDownList runat="server" Id="DropDownList2">
<asp:ListItem Value="tbldem">
Dem
</asp:ListItem>
<asp:ListItem Value="tblvis">
Vis
</asp:ListItem>
</asp:DropDownList>

<asp:DropDownList runat="server" id="DropDownList1">
<asp:ListItem Value="nam">
Name
</asp:ListItem>
<asp:ListItem Value="idcode">
ID
</asp:ListItem>
</asp:DropDownList>

<asp:TextBox runat="server" id="TextBox1">
</asp:TextBox>
<asp:Button runat="server" Text="Button" id="Button1" OnCommand="a" />
</asp:content>

--------------------
BELOW IS MIDDLE.ASPX
--------------------

<%@ page language="VB" masterpagefile="~/try1.master" %>

<asp:content id="Content3" contentplaceholderid="NEXTPLACE" runat="server">
***got here***
</asp:content>

SORRY IF THIS WAS HARD TO READ. THANK YOU VERY MUCH.
 
if i'm reading this write, you're trying to use 2 separate pages at the same time with the masterpage.

you can only use 1 page (aspx) at a time, this then binds with the masterpage. if you want to the content areas to be displayed at the same time, they have to be on the same aspx page.

Unless you change the those aspx pages into usercontrols, which are then embedded into 1 page that will bind with masterpage.

so you would end up with 1 masterpage, 1 aspx page, and 2 usercontrols (ascx).
 
As I said in your last post, that you didn't reply to:

First.. you should use the code behind page for all of your code, not the classic ASP inline style. Debugging etc will be much easier.

Second, don't use ALL CAPS when posting, it is as if you are shouting and makes the post hard to read.

Third, you are doing a Server.Transfer from Pat.aspx to Middle.aspx. Whether you are doing a Server.Transfer or Response.Redirect, you are going to a new page. Not sure what you are expecting to happen.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top