Tuesday, August 2, 2011

A potentially dangerous Request.QueryString value was detected from the client (M=""'>").

I saw this strange error when i request a page. The reason was i have registered a usercontrol which was not in project.

<%@ Register src="../../UserControl/SearchCurrency.ascx" tagname="SearchCurrency" tagprefix="uc1" %>

Simply remove it, now works fine :)

Sunday, July 31, 2011

Fire validations even causesvalidation property already set to false.

In this case there are Required Feild Validator, Comapire Validator and one button and Link button. I set a validation group to Req.. validator, com.. validator and button. And set causesvalidation property false in link button. but when i click the link button, compaire validator fires. I can't understand this behaviour, anyone know this please let me know.

However i resolved it in this way.

http://forums.asp.net/t/1702558.aspx/1?Validation

Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack.

This will occur due to Responce.Redirect() method.

Why we use false to the second argument in above method?
The second argument to Redirect is the boolean literal false, which indicates we do not want an exception to be thrown to terminate the page. If you do not pass false, an exception will occur and this can slow down websites and complicate error handling.

:)

Wednesday, June 22, 2011

RequireField Validator in gridview template feild(fire all validators when i click button in each row)


 protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
   TextBox t1= (TextBox)e.Row.FindControl("t1");
                CompareValidator cv = (CompareValidator)e.Row.FindControl("cv");
                Button btn = (Button)e.Row.FindControl("btn");

                if (t1 != null)
                {
                    t1.ValidationGroup = e.Row.RowIndex.ToString();
                    cv.ValidationGroup = e.Row.RowIndex.ToString();
                    btn.ValidationGroup = e.Row.RowIndex.ToString();
}
}
}
 

Name start with D came first, although i used ascending order

There was a space character in the name feild in the database. That was the reason for D came first :)

I Built a New Kind of Number Puzzle Game (And You Can Play It Free)

 For a long time, I wanted to play a mobile puzzle game that felt genuinely strategic—something that required real brainpower, skipped the a...