• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

JavaScript Pop up box in C#

I don't want a JavaScript pop up box to be attached to any event.  I just want it to show in my OnRowDeleting() event in a GridView.  I have some code that runs and at the end I just want to embed JavaScript to show a pop up box to show the user a message.
0
zintech
Asked:
zintech
  • 2
1 Solution
 
Tom BeckCommented:
Do you just want a javascript alert box to appear when the page returns after the Delete event finishes? You can add this to the successful completion of your RowDeleting sub.

ClientScript.RegisterClientScriptBlock(this.getType(), "alertScript", "alert(\"Delete Successful\");", true);
0
 
zintechAuthor Commented:
I am having issues with the "this.getType()" argument in the method.  I don't have a method that has the getType() name and I don't know which type of System.Type to use for it to work
0
 
Tom BeckCommented:
Just a typo,it's supposed to be this.GetType(). GetType is a built-in method.
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now