Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Client side modal dialog in asp.net from the server side code. (how do I do this)

I need a technique for dealing with what seems pretty simple!

I have a form, with some logic on the server side for validation. if the server side code indicates that there is an issue, I want to display a modal popup to the client.

I am having trouble getting it to work in this way.

I found if I keep all the logic client side, I can use the javascript function

window.showModalDialog("url","title", "style");

However the logic is currently on the server side. this is an ASP.NET 3.5 web project - is there some way to do this using AJAX controls like the scriptmanager, an update panel etc?

Thank you!

like image 833
basementjack Avatar asked Sep 13 '25 05:09

basementjack


1 Answers

I know that you do it using the ScriptManager control. Basically you just send from the server a line of JavaScript to execute immediately. In this case, the client side line you describe.

Sorry to be vague, but it's almost quitting time and I'll have to grep through a lot of code to find an example.

Here is an example

like image 164
CMPalmer Avatar answered Sep 15 '25 18:09

CMPalmer