Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Datagrid giving a 400 error on postback with large dataset

Reply
Thread Tools

Datagrid giving a 400 error on postback with large dataset

 
 
Jason M
Guest
Posts: n/a
 
      02-01-2005
I wont be able to post all the code because it is in a very large project.
What I'm doing is I create a datagrid with a mixt of bound columns and custum
columns filled with link buttons. Basically I'm using the linkbuttons to
create a master/detail page. When the link button is click in the datagrid
another datagrid is created and filled with data from a stored procedure.
This works untill I start working with a very dataset that has about 10,000
rows. If user half that data no problems. Any ideas how to work around this.

here is a snippet of where the code for the when the LinkButton is clicked
in the datagrid but I'm thinking this isn't the problem.

protected void
HG2_ItemCommand(objectsource,System.Web.UI.WebCont rols.DataGridCommandEventArgs e)
{

string s =e.CommandArgument.ToString();
string x=e.CommandArgument[1].ToString();
string myConnString2 = "Password=xx;User ID=xx;Initial
Catalog=DashBoard;Data Source=(local)";

Label lblTitle = new Label();
lblTitle.ID ="lblTitle";
PCP.Controls.Add(new LiteralControl("<BR>"));
PCP.Controls.Add(new LiteralControl("<BR>"));
PCP.Controls.Add(lblTitle);
PCP.Controls.Add(new LiteralControl("<BR>"));
lblTitle.Text = e.CommandName;
lblTitle.ForeColor = System.Drawing.Color.MediumSeaGreen;
lblTitle.Font.Size = 14;
lblTitle.Font.Bold = true;
SqlConnection conn2 = new SqlConnection(myConnString2);
conn2.ConnectionString = myConnString2;
conn2.Open();
SqlCommand cmd2 = conn2.CreateCommand();
cmd2.CommandText = "[detail]";
cmd2.CommandType = System.Data.CommandType.StoredProcedure;
cmd2.Connection = conn2;
DataSet ds2 = new DataSet();
SqlDataAdapter da2 = new SqlDataAdapter(cmd2);
da2.Fill(ds2);
ds2.Tables[0].TableName ="detail";

DataGrid DG1 = new DataGrid();
DG1.ID = "DG1";
PCP1.Controls.Add(new LiteralControl("<BR>"));
PCP1.Controls.Add(DG1);
DG1.GridLines = GridLines.Both;
DG1.CellPadding =1;
DG1.ForeColor=System.Drawing.Color.Black;
DG1.Font.Size = System.Web.UI.WebControls.FontUnit.Smaller;
DG1.BackColor = System.Drawing.Color.WhiteSmoke;
DG1.HeaderStyle.BackColor = System.Drawing.Color.LightSteelBlue;


DG1.DataSource=ds2;
DG1.DataMember ="detail";
DG1.DataBind();

}



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
The giving that keeps on giving sixteenmillion C Programming 0 11-19-2007 10:59 PM
Canon Lense Recommendation: 400 5.6 (non-IS) -or- 100-400 IS Alien Clumps Digital Photography 3 09-20-2004 01:40 AM
How does ISO 400 in Digital Rebel compare to ISO 400 film? Veggie Digital Photography 19 08-23-2004 11:38 AM
Olympus Stylus 300/ 400 (mju 300 / 400) carry case Clive Long,UK Digital Photography 1 10-11-2003 01:33 AM
dr("field").toString returns "400.0000" instead of "400" Dan C Douglas ASP .Net 5 07-22-2003 05:48 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57