Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I'm on my first ASP.net project...

 

I have a search page where users can enter their company name and it brings back all the related activities.

 

One company has 7900 something activities.

 

I have a RadioButtonList and SQL to bring back and display the restults.

 

So, I enter the company's name, brings back this 7000+ rows, displays it and then The application HANGS! ... I click on other buttons to go to other pages, but nothing happens..I can scroll down and up on the same page to look at the results but other buttons dont work...

 

What to do, any suggestions,ideas?

Posted

Can you post the way you do this?, sometimes will take a long time to the page to process all your data and then create the HTML and then send it to the browser.

Are you using datasets?, a repeater control? a datagrid?

Fat kids are harder to kidnap
Posted

I'm using "sql reader".... This is what I have:

 

Any suggestions,changes i need to make?

 

If Not Page.IsPostBack Then
           Dim cnn As SqlConnection = New SqlConnection(ConfigurationSettings.AppSettings("ConnString"))
           Dim cmd As SqlCommand = cnn.CreateCommand
           cmd.CommandType = CommandType.Text

          

           cmd.CommandText = Select '<b>Incident#: </b>' + incid_id +  ' <b>Short Desc:</b>' + incid_short_desc as ID " & _
           " from ...." 

           cnn.Open()
           Dim dr As SqlDataReader = cmd.ExecuteReader(CommandBehavior.CloseConnection)
         [b]  rblDisplayIncidents.DataSource = dr
           rblDisplayIncidents.DataBind() [/b]

                       If rblDisplayIncidents.Items.Count > 0 Then 
               rblDisplayIncidents.Visible = True
               lblIncidentCount.Visible = True
               Dim intIncidentCount = rblDisplayIncidents.Items.Count
               lblIncidentCount.Text = "# of Matches: " & intIncidentCount
               dr.Close()
               cnn.Close()

           Else
               lblNoIncident.Visible = True
               Session("noIncidentFound") = "Y"
               Response.Redirect("Incident.aspx")
           End If

       End If

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...