Hi,<BR>I have an application that saves the user&#039;s sql query.<BR>The next time they enter it checks whether the query is saved or not. If it is, it displays the results of the query.<BR>The problem is that the initial check of the cookie does not work. Although the cookie exists it does not do what is expected.<BR>Here is the code snippet:<BR>------------------------<BR>if (Request.Cookies["SQL"]!=null)<BR> {<BR> if (Request.Cookies["SQL"].Value!="")<BR> {<BR> string SQL = Request.Cookies["SQL"].Value;<BR> Data myD = new Data();<BR> DataTable oDT;<BR> oDT = myD.getMainGridData(SQL);<BR> dgQuery.DataSource = oDT;<BR> dgQuery.DataBind();<BR> dgQuery.SelectedIndex = dgQuery.Items.Count-1; <BR> }<BR> }<BR><BR>------------------------------<BR><BR>What am I doing wrong here.<BR><BR>10x<BR><BR>Tom