Click here to Skip to main content
15,911,360 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: access server controls using javascript in web user controls Pin
Christian Graus21-Mar-08 19:32
protectorChristian Graus21-Mar-08 19:32 
GeneralRe: access server controls using javascript in web user controls Pin
indian14321-Mar-08 19:51
indian14321-Mar-08 19:51 
GeneralRe: access server controls using javascript in web user controls Pin
Christian Graus21-Mar-08 20:02
protectorChristian Graus21-Mar-08 20:02 
GeneralRe: access server controls using javascript in web user controls Pin
indian14322-Mar-08 2:07
indian14322-Mar-08 2:07 
GeneralRe: access server controls using javascript in web user controls Pin
N a v a n e e t h21-Mar-08 20:20
N a v a n e e t h21-Mar-08 20:20 
GeneralRe: access server controls using javascript in web user controls Pin
indian14322-Mar-08 2:12
indian14322-Mar-08 2:12 
GeneralRe: access server controls using javascript in web user controls Pin
N a v a n e e t h22-Mar-08 5:52
N a v a n e e t h22-Mar-08 5:52 
QuestionHow to: Create a MessageBox Class for Asp.Net Pin
ScepterMT21-Mar-08 14:25
ScepterMT21-Mar-08 14:25 
When I began the programming for http://www.sceptermarketingtechnologies.com, I quickly noticed that Asp.net does not support the MessageBox class that I was familiar with in windows forms.

Since Asp.net runs on the server it doesn't have access to produce a modal dialog box on the client. However, by using a scripting language that runs in the clients browser a similar construct is available. In javascript the window.alert() function will produce a modal dialog similar to what you would expect from MessageBox in windows forms.

So, I decided to create a static class MessageBox with a static method Show(), which will give you the ablility to to still use the syntax MessageBox.Show("Your Message"); and then convert it into the javascript window.alert("Your Message"); and add the script to the end of the current response stream.

I've written a how to on my blog at: http://sceptermt.blogspot.com/2008/02/how-to-create-message-box-class-in-c.html that shows the source code that I used in C# for my web application and details on how it works.

You could also write overloads for the static show() method to allow the class to do a javascript confirm() or a prompt(). I haven't needed that functionality yet so I've just kept it simple.
AnswerRe: How to: Create a MessageBox Class for Asp.Net Pin
Christian Graus21-Mar-08 16:54
protectorChristian Graus21-Mar-08 16:54 
GeneralDatabase Engines Pin
Mohammad A Gdeisat21-Mar-08 12:37
Mohammad A Gdeisat21-Mar-08 12:37 
GeneralRe: Database Engines Pin
Christian Graus21-Mar-08 12:54
protectorChristian Graus21-Mar-08 12:54 
GeneralRe: Database Engines Pin
Mohammad A Gdeisat21-Mar-08 12:57
Mohammad A Gdeisat21-Mar-08 12:57 
GeneralRe: Database Engines Pin
Christian Graus21-Mar-08 13:02
protectorChristian Graus21-Mar-08 13:02 
GeneralRe: Database Engines Pin
Mohammad A Gdeisat21-Mar-08 13:12
Mohammad A Gdeisat21-Mar-08 13:12 
GeneralRe: Database Engines Pin
Christian Graus21-Mar-08 13:22
protectorChristian Graus21-Mar-08 13:22 
GeneralRe: Database Engines Pin
Brady Kelly21-Mar-08 23:43
Brady Kelly21-Mar-08 23:43 
GeneralRe: Database Engines Pin
Paul Conrad21-Mar-08 13:16
professionalPaul Conrad21-Mar-08 13:16 
GeneralRe: Database Engines Pin
Paul Conrad21-Mar-08 13:14
professionalPaul Conrad21-Mar-08 13:14 
GeneralRe: Database Engines Pin
Mohammad A Gdeisat21-Mar-08 13:18
Mohammad A Gdeisat21-Mar-08 13:18 
GeneralRe: Database Engines Pin
Christian Graus21-Mar-08 13:24
protectorChristian Graus21-Mar-08 13:24 
GeneralRe: Database Engines Pin
Paul Conrad21-Mar-08 13:27
professionalPaul Conrad21-Mar-08 13:27 
GeneralRe: Database Engines Pin
Christian Graus21-Mar-08 13:33
protectorChristian Graus21-Mar-08 13:33 
GeneralRe: Database Engines Pin
Mohammad A Gdeisat21-Mar-08 13:37
Mohammad A Gdeisat21-Mar-08 13:37 
GeneralRe: Database Engines Pin
Paul Conrad21-Mar-08 13:42
professionalPaul Conrad21-Mar-08 13:42 
GeneralRe: Database Engines Pin
N a v a n e e t h21-Mar-08 20:17
N a v a n e e t h21-Mar-08 20:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.