473,382 Members | 1,593 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,382 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 1597

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 load. The script does not timeout, nor the...
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 servers. All of our ASP pages are written using...
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 happening in the almost the exact same setup -The...
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 doing wrong. I have a page (ViewDocument.aspx)...
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. Everything works fine until I click on View Week link. Then...
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 in the form if (( $subscriber ) && ($_SERVER ==...
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 stdout. I know there were several reports related to...
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 textboxes, then this page run successfully. but if...
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 server1 to server2 everything works fine accept...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.