This is a problem I don't really understand. I think it maybe a time out issue.

I have a search box accessing csv files. if the browser is open for 20 minutes and I run a search the browser crashes.

if I stop a search in the middle of resolving data and then search again the browser crashes.

Any ideas?

have a look at the application pool in iis associated with your site, the idel time may need to be extended.

I have altered that and it got me to the 20 minutes, which is ok. I could put a refresh in there for 15 minutes to avoid crashes. However that still leaves me with the following problem.

if I stop a search in the middle of resolving data and then search again the browser crashes.

So I think the issue is related to my variables holding data?

Any idea's would be appreciated.

what is the code you are using for the search?

I think u are using session variable. So it has a timeout. You can set the time from IIS. But it will be wise to check before using session variable. Like:

if(Session["myname"]!=null)
myname=Session["myname"].ToString();

Here is the code.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Inventory Search</title>
</head>

<body bgcolor="#CCCCCC">
    
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td><p align="center" style="margin-top: 0; margin-bottom: 0">
                    <img border="0" src="images/09-0208.jpg" width="985" height="195" />
                </p>
            </td>
        </tr>
    </table>
    
 <script language="javascript">
   window.onload=function Load()
   {
 	 document.forms["form1"].elements["TextBoxPartNumber"].focus();
	 document.forms["form1"].elements["TextBoxPartNumber"].value="";
	    }
 </script>

 
 <form id="form1" runat="server">

    <div>

        <table>
            
            <tr>
                <td>Product number</td>
                <td><asp:TextBox ID="TextBoxPartNumber" runat="server"></asp:TextBox></td>
				<asp:TextBox runat="server" style="visibility:hidden;display:none;"/><td><asp:Button ID="ButtonSearch" runat="server" Text="Search" /></td>
				<asp:RequiredFieldValidator ControlToValidate="TextBoxPartNumber" Text="Item Number Required" runat="server" /></tr>

            <tr><td><br /></td></tr>

            <tr>    
                <td></td>
                <td><asp:Label ID="LabelLine1" runat="server" Text=""></asp:Label></td>
                <td><asp:Label ID="LabelItemNumber" runat="server"></asp:Label></td>
            </tr>   
                     
            <tr>    
                <td></td>
                <td><asp:Label ID="LabelLine2" runat="server" Text=""></asp:Label></td>
                <td><asp:Label ID="LabelDescription" runat="server"></asp:Label></td>
            </tr>
            
            <tr>    
                <td></td>
                <td><asp:Label ID="LabelLine3" runat="server" Text=""></asp:Label></td>
                <td><asp:Label ID="LabelQty" runat="server"></asp:Label></td>
            </tr>

            <tr>    
                <td></td>
                <td colspan="2"><br /><asp:Label ID="LabelCallForDetails" runat="server" Text="Please contact sales at <b>1-800</b> for pricing" Visible="false"></asp:Label><br /></td>
            </tr>            

        </table>
        
        <br />
        Related Items:<br />
        <hr />
        
        </div>
        <asp:Table ID="TableAdditional" runat="server" Height="24px" Width="800px">
        </asp:Table>
        
    </form>
   
    
</body>
</html>

Please post your cs code. Otherwise other members cant identify your problem. It will be bteer to come up with the original error message.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.