There was a ImageButton in my aspx page.
protected void smsbtn_Click(object sender, ImageClickEventArgs e)
{
}
I changed the code. I used LinkButton instead of ImageButton.
protected void smsbtn_Click(object sender, ImageClickEventArgs e)
{
}
But i fogot to change the ImageClickEventArgs to EventArgs. That was the reason for getting this error. :)
Wednesday, August 3, 2011
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 :)
<%@ 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
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.
:)
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.
:)
Thursday, July 28, 2011
Thursday, July 21, 2011
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();
}
}
}
Subscribe to:
Posts (Atom)
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...
-
Microsoft Graph API provides powerful capabilities to interact with Microsoft 365 services. In this guide, we’ll explore how to create calen...
-
When you already have IIS running then you may not be able to run WAMP Server at Localhost. You need to shutdown IIS in order to run WAMP Se...
-
Here a javascript solution for detecting session expire. <html xmlns="http://www.w3.org/1999/xhtml" > <head runat=...