Solved

JavaScript Pop up box in C#

Posted on 2012-04-09
3
234 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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 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…

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now