try the following (put it in your Page_Load) if(!IsPostBack) { if(Application["num"]==null) Application.Add("num",0); int n=(int)Application["num"]; Application["num"]=++n; if(n>=50) { //show an error page } } il nome mio nessun sapra
Ramin Tarhande
Posts
-
Limitation of users accessing an ASP.NET page -
Container.DataItem.Row.GetChildRows ProblemYou must cast it first, because it thinks that it's an 'object'. in C# it would be somethig like this: ((System.Data.DataRowView)Container.DataItem).Row.GetChildRow["MsgComments"] good luck:-D il nome mio nessun sapra
-
Problem retrieving object from SessionI store my data in an object an put it into Session sometimes when I want to get back the object from session I encounter an error message saying the object is null note: -the object is large (including some DataSets) -when I run in Debug mode it always works ok! could anybody help me solve the problem? :confused: thx il nome mio nessun sapra
-
:: problem in UPDATE statement ::here is a sample code: int id=17; SqlConnection conn=new SqlConnection("initial catalog=Persons;user id=sa"); SqlCommand cmd=conn.CreateCommand(); cmd.CommandText="Update Catalog Set price=price*2 where id="+id.ToString(); cmd.CommandType=CommandType.Text; conn.Open(); cmd.ExecuteNonQuery(); conn.Close(); the better way would be to call a stored procedure & pass parameters to it I hope it helps. Movaffaq bashi :-O il nome mio nessun sapra