Can I set an unlimited length for maxJsonLength in web.config?

NOTE: this answer applies only to Web services, if you are returning JSON from a Controller method, make sure you read this SO answer below as well: https://stackoverflow.com/a/7207539/1246870 The MaxJsonLength property cannot be unlimited, is an integer property that defaults to 102400 (100k). You can set the MaxJsonLength property on your web.config: <configuration> <system.web.extensions> <scripting> … Read more

how to put and use two flags(insert and update flags) on a single button to perform two operations in asp.net with C#

var record = du.SelectQuery(“select * from where Crop_Master Crop_Name=”@Crop_Name”); if(record.Count > 0) { du.ExecQry(“Update Crop_Master set Crop_Name= “”+TextBox1.Text+”‘ where Crop_Name=”@Crop_Name” “); } else { du.ExecQry(“insert into Crop_Master(Crop_Name,Created_On,Created_By,Created_By_Ip)values(‘” + TextBox1.Text + “‘,GETDATE(),'” + ViewState[“user”] + “‘,'” + ViewState[“ip”] + “‘)”); } Label2.Text = “Submitted”; Label2.ForeColor = System.Drawing.Color.Green; I Just help you out with task, but don’t … Read more