Hi All,
I am getting the above error when click on Ok button on confirm message box in web application.
This is my requirement.
When I click on the Search button on web page it should check the data in db then it should be display Confirm message dialog "Do u want to load the data" if user click yes it should load the data in page and it is working fine in my system (localhost),when I copy the same code in server and I am accessing web page from my machine using IE it giving the above error.Please any one help on this it is urgent thanks in advance...
//Button event
private void btn_Search_Click(object sender, System.EventArgs e)
{
int intCount = m_bo_Bulkupload.CheckExistingData("Book1");
if ( intCount > 0 )
//calling method from msgbox.dll file
MsgBox1.confirm("Book Already existed Do you want to re-load again?","hd1");
}
//Page Load
private void Page_Load(object sender, System.EventArgs e)
{
if (!this.IsPostBack)
{
//Some code
}
else
{
if(Request.Form["hd1"]=="1")
{
Request.Form["hd1"].Replace("1","0");
DataTable dtSearch =new DataTable();
dtSearch= m_bo.Getload("Book1");
}
}
}
//this the code for the MsgBox1.Confirm from (msgbox.dll)
public void confirm(string msg,string hiddenfield_name)
{
string sMsg = msg.Replace( "\n", "\\n" );
sMsg = msg.Replace( "\"", "'" );
StringBuilder sb = new StringBuilder();
sb.Append( @"");
sb.Append( @"" );
content=sb.ToString();
}
Vuyani NdlovuPosted Jun 16, 2008, 12:32 PM
I had the same problem and your solution worked.....
Thanx Anita
anita singhPosted May 28, 2008, 6:12 AM
Hi Ravi,
Well I have read your problem.Select .aspx file of the page that is throwing this error and set EnableEventValidation="false" in page directive.Your application will surely run.