472,331 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Page Hangs

Hi -

I have an ASP.NET page that hangs (some times; if it loads for you, try
refresh/F5 several times) when I try to run it on my localhost. It contains
an HTML table for formatting, and within the table are several labels,
textboxes, and validators. One of the textboxes is multiline and readonly,
and the codebehind page has code to read a text file into it. (The text
file is about 21,000 characters with spaces.) The aspx page has a
javascript function to set focus on the first textbox when the page loads.
I've also included "<pages smartNavigation="true"/>" in web.config.

My Page_Load event and the entire aspx page is below. When the page hangs,
pressing Esc will stop the hang and display the form, but the text in the
multiline textbox is not complete (last line should be "-- End Of File --").

If I remove the table row with the multiline textbox and leave the rest of
the table rows as they are, the page doesn't hang. If I remove all of the
table rows except the one with the multiline textbox, the page doesn't hang
and the text file loads to end of file.

Can anyone see what might be causing the hang??

Thanks for your help.

- Jeff
'****************
Page_Load code:

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here

Dim srdFile As StreamReader
srdFile = File.OpenText(Server.MapPath("Loren ipsum.txt"))
Me.TextBox1.Text = srdFile.ReadToEnd()
srdFile.Close
srdFile = Nothing
End Sub

'****************
aspx page:

<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="TextTest01.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema
content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
<script language="JavaScript">
<!--
function setFocus() { document.forms.Form1.txtCompanyName.focus(); }
//-->
</script>
</HEAD>
<body onload="setFocus();">

<form id="Form1" method="post" runat="server">
<TABLE id=Table1 cellSpacing=0 cellPadding=10 width="90%" border=0>
<TR>
<TD>
<asp:label id=lblCompanyName runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">COMPANY NAME <font color=#ff0000>*</font></asp:label><BR>
<asp:textbox id=txtCompanyName runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="300px"></asp:textbox>&nbsp;
<asp:requiredfieldvalidator id=rfvCompanyName runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="Company Name is a Required Field"
ControlToValidate="txtCompanyName"></asp:requiredfieldvalidator>
</TD>
</TR>
<TR>
<TD>
<asp:label id=lblWebsite runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">Company Website URL</asp:label><BR>
<asp:textbox id=txtWebsite runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="375px"></asp:textbox>&nbsp;
</TD>
</TR>
<TR>
<TD>
<asp:label id=lblAddress runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">ADDRESS</asp:label><BR>
<asp:textbox id=txtAddress1 runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="300px"></asp:textbox>&nbsp;&nbsp;<font
color=#ff0000>*</font>
<asp:requiredfieldvalidator id=rfvAddress runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="Address is a Required Field"
ControlToValidate="txtAddress1"></asp:requiredfieldvalidator><BR>
<asp:textbox id=txtAddress2 runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="300px"></asp:textbox>
</TD>
</TR>
<TR>
<TD>
<asp:label id=lblCity runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">CITY <font color=#ff0000>*</font></asp:label><BR>
<asp:textbox id=txtCity runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="225px"></asp:textbox>&nbsp;
<asp:requiredfieldvalidator id=rfvCity runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="City is a Required Field"
ControlToValidate="txtCity"></asp:requiredfieldvalidator>
</TD>
</TR>
<TR>
<TD>
<asp:label id=lblRegion runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"><B>County or
Postal Region</B> (Outside of the US, Australia, and Canada)</asp:label><BR>
<asp:textbox id=txtRegion runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="225px"></asp:textbox>&nbsp;
</TD>
</TR>
<TR>
<TD>
<asp:label id=lblZip runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">ZIP or Postal Code</asp:label><BR>
<asp:textbox id=txtZip runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="150px"></asp:textbox>&nbsp;
</TD>
</TR>
<TR>
<TD>
<asp:label id=lblCountry runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">Country <font color=#ff0000>*</font></asp:label><BR>
<asp:textbox id=txtCountry runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="225px">United States</asp:textbox>&nbsp;
<asp:requiredfieldvalidator id=rfvCountry runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="Country is a Required Field"
ControlToValidate="txtCountry"></asp:requiredfieldvalidator>
</TD>
</TR>
<TR>
<TD>
<TABLE id=Table2 height=196 width=523 border=2>
<TR>
<TD>
<TABLE id=Table3 cellSpacing=0 cellPadding=5 width="100%"
border=0>
<TR>
<TD colSpan=3>
<asp:label id=lblContactPerson runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True" Font-Underline="True">CONTACT PERSON</asp:label>
</TD>
</TR>
<TR>
<TD width=50></TD>
<TD width=199>
<asp:label id=lblContactName runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">NAME <font color=#ff0000>*</font></asp:label><BR>
<asp:textbox id=txtContactName runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="225px"></asp:textbox><BR>
<asp:requiredfieldvalidator id=rfvContactName runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="Name is a Required Field"
ControlToValidate="txtContactName"></asp:requiredfieldvalidator>
</TD>
<TD>
<asp:label id=lblContactPassword runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">PASSWORD <font color=#ff0000>*</font></asp:label><BR>
<asp:textbox id=txtContactPassword runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="150px" TextMode=Password></asp:textbox><BR>
<asp:requiredfieldvalidator id=rfvContactPassword runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="Password is a Required Field"
ControlToValidate="txtContactPassword"></asp:requiredfieldvalidator>
</TD>
</TR>
<TR>
<TD width=50></TD>
<TD width=199>
<asp:label id=lblContactPhone runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">TELEPHONE <font color=#ff0000>*</font></asp:label><BR>
<asp:textbox id=txtContactPhone runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="150px"></asp:textbox><BR>
<asp:requiredfieldvalidator id=rfvContactPhone runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="Telephone is a Required Field"
ControlToValidate="txtContactPhone"></asp:requiredfieldvalidator>
</TD>
<TD>
<asp:label id=lblContactEmail runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="8pt"
Font-Bold="True">eMAIL <font color=#ff0000>*</font></asp:label><BR>
<asp:textbox id=txtContactEmail runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
Width="300px"></asp:textbox><BR>
<asp:requiredfieldvalidator id=rfvContactEmail runat="server"
Font-Names="Verdana,Arial,Helvetica,sans-serif" Font-Size="10pt"
ErrorMessage="eMail is a Required Field"
ControlToValidate="txtContactEmail"></asp:requiredfieldvalidator>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
<tr>
<td>
<asp:TextBox id=TextBox1 Font-Names="Verdana,Arial,Helvetica,sans-serif"
runat="server" Width="500px" Height="150px" TextMode="MultiLine"
ReadOnly="True" EnableViewState="False"></asp:TextBox>
</td>
</tr>
</TABLE>

</form>

</body>
</HTML>
Nov 19 '05 #1
0 1527

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Paul Robinson | last post by:
I am developing a website in ASP that connects to a Sybase database. However, when I try to open a connection to the database the page will not...
1
by: Evan Nelson | last post by:
We are running a website on 3 W2K servers running IIS 5.0 as the webservers and using a server running under Windows Server 2003 for the database...
0
by: psb | last post by:
I make a website for a company where sales reps from all over the country order literature. This is the 4th case where the exact same thing is...
2
by: Brad Quinn | last post by:
It appears that IIS hangs the first time two requests are made for same page in quick succession. Although it may very well be something else I'm...
1
by: AMD Desktop | last post by:
Hi, I have a problem and not sure what is going on here, may be the coding is not proper. This is a simple page with calendar events....
5
by: JasonDamianUs | last post by:
Hello all, I am trying to write a simple PHP script to process a form.. the function seems to be working fine // subscriber is the users email...
2
by: Pierre Rouleau | last post by:
Hi all, I have a consistent test case where os.popen3() hangs in Windows. The system hangs when retrieving the lines from the child process...
2
by: Dipti Singh | last post by:
Hi, I have two asp pages. when both contain lots of coding, loops etc. if i run the first page that contain for loop for creating array of...
1
by: =?Utf-8?B?TmFt?= | last post by:
ASP.NET 1.1.4322 Server1: Windows Server Enterprise Ed 2003 – SP2 Server2: Same as Server 1. IE 6.0 –SP2 After we migrated our website from...
0
by: tammygombez | last post by:
Hey fellow JavaFX developers, I'm currently working on a project that involves using a ComboBox in JavaFX, and I've run into a bit of an issue....
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

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.