Displaying text variable in ASPX file

I have no experience using ASP.NET and neither do any of the people I work with. I've inherited an old ASPX program from a programmer that moved on years ago. If you search the code below for the last instance of the variable TextToUse (near the bottom) , you will see that I had hoped that  <%=TextToUse% would display the string that has been assigned to this variable. In fact, it generates an error. If I remove this one snippet of code, the file works fine. How can I get this file to display the contents of this variable at this point in the code?  Thanks.
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="Progress.aspx.vb" Inherits="Progress.WebForm1"%>
<%	
Dim WhichText As String
Dim TextToUse As String
WhichText=Request.QueryString("new_window")
       Select case WhichText
             Case ""
             TextToUse="Once you've downloaded the file, please click the Browser's Back button and then select another menu option."
			 Case "N"
             TextToUse="Once you've downloaded the file, please click the Browser's Back button and then select another menu option."
             Case "Y"
             TextToUse="If the previous message that you saw indicated that your report can all be printed in one file, close this window after you have downloaded your file. You can then proceed to change your crosstab selections and generate another report of the same type or you can select another option from EIM's menu.  If, however, the message that appeared told you that your report exceeds the maximum number of 256 columns, you must first close this window before you follow the instructions to select the same menu option aain to generate the remainder of your report."
       end select
 
 
%>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>WebForm1</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<meta http-equiv=Refresh content="<%# RefreshSeconds %>">
	</HEAD>
	<body bgColor="#edebea" MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<asp:table id="Table1" style="Z-INDEX: 101; LEFT: 100px; POSITION: absolute; TOP: 72px" runat="server"
				BackColor="#E0E0E0" BorderWidth="0px" BorderColor="#E0E0E0" BorderStyle="None" Height="24px"
				Width="760px">
				<asp:TableRow BorderWidth="0px" BorderColor="#0000C0" BorderStyle="Solid" BackColor="White">
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
					<asp:TableCell BackColor="#E0E0E0" ForeColor="#E0E0E0" BorderColor="#E0E0E0"></asp:TableCell>
				</asp:TableRow>
			</asp:table><asp:label id="Label1" style="Z-INDEX: 102; LEFT: 240px; POSITION: absolute; TOP: 16px" runat="server"
				Height="32px" Width="716px" Font-Size="X-Large" Font-Names="Verdana">Creating Your Requested File</asp:label>
  		   	<asp:label id="Label2" style="Z-INDEX: 103; LEFT: 100px; POSITION: absolute; TOP: 128px" runat="server" 
				Height="96px" Width="800px" Font-Size="Medium" Font-Names="Verdana" Visible="False"><%=TextToUse%></asp:label>
			<asp:Button id="Button1" style="Z-INDEX: 104; LEFT: 224px; POSITION: absolute; TOP: 224px" runat="server"
				Height="48px" Width="504px" Font-Names="Verdana" Visible="False" Text="Your file is complete.  Click here to Download it."
				Font-Bold="True" BackColor="Silver"></asp:Button></form>
	</body>
</HTML>

Open in new window

gregbuckleAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Juan_BarreraCommented:
Hi, try this:

- Remove the <%=TextToUse%> part from the Label.
- In code behind, after the "end select" line, enter Label2.Text = TextToUse

That should be all.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.