|
-
Need for a way to execute SP, close window and display alert..............
Fellow programmer, I am new to ASP.NET and am in need of some advice. I am executing a Stored Procedure in the OnInit function and after it executes, I would like to close the window and display an alert message. Below is the code snippet which executes the stored procedure and closes the window. But I am not able to display the alert message.
protected override void OnInit(EventArgs e)
{
sAction = Request.QueryString["action"];
String sId = Request.QueryString["id"];
int iId = sId == null ? 0 : int.Parse(sId);
this.EditFarmID = iId;
DeleteFrmEntryDS(this.EditFarmID);
ClientScript.RegisterStartupScript(GetType(), "alert", "<script type=\"text/javascript\">window.opener=self; window.close();</script>");
}
}
If I include the Alert towards the end of my JS, then the alert displays, but the window does not close. Its because of the timing.
I am trying to reduce creating extra asp pages and would prefer to do everything in fewer amounts of asp pages needed. That’s why I am doing the processing of my SP in the same page as the form.
Any help would be appreciated.
Similar Threads
-
Replies: 0
Last Post: 08-18-2006, 05:25 AM
-
By Usha.R in forum ASP.NET
Replies: 1
Last Post: 02-14-2006, 03:30 AM
-
By Rachel Ernst in forum Architecture and Design
Replies: 1
Last Post: 02-13-2001, 01:15 PM
-
By TC in forum VB Classic
Replies: 8
Last Post: 09-26-2000, 02:34 AM
-
By TC in forum VB Classic
Replies: 0
Last Post: 09-25-2000, 09:06 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks