Solved

JavaScript Pop up box in C#

Posted on 2012-04-09
3
235 Views
Last Modified: 2012-04-09
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
Comment
Question by:zintech
  • 2
3 Comments
 
LVL 38

Expert Comment

by:Tom Beck
ID: 37824017
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
 

Author Comment

by:zintech
ID: 37824224
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
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 37824281
Just a typo,it's supposed to be this.GetType(). GetType is a built-in method.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question