N
Nedu N
Hi All,
I am facing a typical problem in my .NET application with the pop-up script
messages. The thing is that its working fine when i run on my development
machine but not running in expected manner when i move it to Prod
environment. Please have a look at the following code snippet...
//Page name - Add.aspx
private void Page_Load(object sender, System.EventArgs e)
{
//Page load goes here --
}
private void Submit_Click(object sender, System.EventArgs e)
{
// PopUp1
if (row exists with the kay say 'ABC' in database)
{
Response.Write("<script> alert('ABCD already exists!!');</script>");
}
else
{
//code to add the row with 'ABCD' goes here
// PopUp2
Response.Write("<script> alert('ABCD added successfully!!');</script>");
//Redirected to the same page
Server.Transfer("Add.aspx");
}
}
---------
Here the problem is that when i run thei code on my dev server, while adding
the row with ABCD, it gets added succesfully and give the popup saying 'ABCD
added succesfully' and if i try to add the same row again then i get the
'ABCD already exists' message. But when i moved this dll to production box
and it is not giving me the same result. What happens while adding row with
ABCD(by clicking submit button) it adds the row and gives 'ABCD added
sucessfully' and followed by it gives 'ABCD already exists' message also. I
see that the Submit_Click procedure being triggered twice on prodution box.
The dev version in VSNET - 2003 and PORD one is higher version than this
one. Is there any poblem in Server.Transfer while redirecting to the same
page? But it works fine on Test machine. Unfortunately i am not able to
debug on the production box, since i have moved only the dll and the aspx
pages to production box.
Thanks
I am facing a typical problem in my .NET application with the pop-up script
messages. The thing is that its working fine when i run on my development
machine but not running in expected manner when i move it to Prod
environment. Please have a look at the following code snippet...
//Page name - Add.aspx
private void Page_Load(object sender, System.EventArgs e)
{
//Page load goes here --
}
private void Submit_Click(object sender, System.EventArgs e)
{
// PopUp1
if (row exists with the kay say 'ABC' in database)
{
Response.Write("<script> alert('ABCD already exists!!');</script>");
}
else
{
//code to add the row with 'ABCD' goes here
// PopUp2
Response.Write("<script> alert('ABCD added successfully!!');</script>");
//Redirected to the same page
Server.Transfer("Add.aspx");
}
}
---------
Here the problem is that when i run thei code on my dev server, while adding
the row with ABCD, it gets added succesfully and give the popup saying 'ABCD
added succesfully' and if i try to add the same row again then i get the
'ABCD already exists' message. But when i moved this dll to production box
and it is not giving me the same result. What happens while adding row with
ABCD(by clicking submit button) it adds the row and gives 'ABCD added
sucessfully' and followed by it gives 'ABCD already exists' message also. I
see that the Submit_Click procedure being triggered twice on prodution box.
The dev version in VSNET - 2003 and PORD one is higher version than this
one. Is there any poblem in Server.Transfer while redirecting to the same
page? But it works fine on Test machine. Unfortunately i am not able to
debug on the production box, since i have moved only the dll and the aspx
pages to production box.
Thanks