473,322 Members | 1,778 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,322 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 1594

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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.