November 05, 2005

Skip Navigation LinksIrocon > Blog > 2005 > November, 2005 > November 05, 2005

HtmlEncode and HtmlDecode

Very handy functions for making user input safe.1) Add ValidateRequest="false" to the page declaration of your asp.net page2) Encode the input before saving it by using HttpUtility.HtmlEncode3) On the page that has to display the content, use HttpUtility.HtmlDecodeLast Updated:Thursday, September 02, 2010By:alfero#

Modal Dialogs in .NET [Windows Forms]

The article Building Windows Applications in VB.NET on InformtIT.com explains extensively how to work with modal dialogs in windows forms.1) You can create a Form variable in the dialog that you use to reference back to the calling form and you set it before showing the dialog, for example: frmDialog.Caller = Me2) You can use properties in the dialog to set its variables before showing, then...Last Updated:Thursday, September 02, 2010By:alferoSource#

Modal dialogs in .NET

A comment by Szymon Kobalczyk on this thread explains how to show modal dialogs in asp.net.I did this just last week. I had a little problem though: when you put aWebForm in a modal all postback or navigation will go to another, new windowinstead of the dialog. You can overcome this by puting the dialog inside ofa FRAME. So now I have a simple html page that I open in the dialog and thenit...Last Updated:Thursday, September 02, 2010By:alferoSource#