Q
Problem solve Get help with specific problems with your technologies, process and projects.

How do you put up a popup window from the VB class generated from the page class?

I am developing an ASP.NET application. I have a form that I designed using the WEB controls. After collection information from the user, like Social Security number and name, I add a record to a database. The record is added in the VB code for the onclick. If there is an error with the database, or if a duplicate record is going to be added, I want to display a popup menu on the client side. The MessageBox.show is a server class (as I understand it) and would not work for the client side. How do you put up a popup window from the VB class generated from the page class?
Ahh, the cries of a developer who's trying to make a thin client application into a rich client application. Unless you are going to write a custom control that uses JavaScript to pop the message box on the client after you do the post back, there's no way to accomplish what you want.

With a thin client application running in a browser, you're much better off using the data validation controls to inform the user of the problem after the post back. That's exactly what these controls were designed to help you do. For more information on these controls, search for "Introduction to Validating User Input in Web Forms" on the MSDN.

Dig Deeper on VB 6 to VB .NET Migration

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchCloudComputing

SearchSoftwareQuality

TheServerSide.com

SearchCloudApplications

Close