.Net, ASP.NET, C#, Programming, VB.NET, Web Development, WebForms

ASP .NET: Safely Escape Data from your Database to Display in HTML but Still Keep Line Breaks

ASP.NET 4.6
ASP.NET 4.6

In this short article I will show a simple example of how to secure data for presentation but still keep select formatting such as line breaks. For more .NET tips feel free to browse the categories of my site at: https://jwcooney.com/category/net/ Continue reading “ASP .NET: Safely Escape Data from your Database to Display in HTML but Still Keep Line Breaks”

Advertisement
.Net, ASP.NET, C#, Dialog, JavaScript, JQuery, Programming, UpdatePanel, VB.NET, Web Development, WebForms

Problems with jQuery Modal Dialog Inside Partial Postacks (ie: a .NET UpdatePanel)

Problems with jQuery Modal Dialogs problem can happen in a number of ways (see some of my other articles on the subject). This time, it was that I used a jQuery Modal Dialog inside of an ASP.NET UpdatePanel. After some looking around, what seems to be happening is that the dialog invisibly duplicates fields to the end of the document sent to the browser.
Continue reading “Problems with jQuery Modal Dialog Inside Partial Postacks (ie: a .NET UpdatePanel)”

.Net, ASP.NET, C#, Database, Programming, Security, SQL, VB.NET, Web Development, WebForms

Example of Encrypting and Decrypting a String into a SQL Table Using ASP.NET

I’ve put together this article because even after a lot of searching, I wasn’t able to find a simple, working example of how to encrypt and then decrypt a string that you are saving in your database in ASP.Net. Sure, there are some partial examples, but partial code usually doesn’t answer the question properly. Added to that, a lot of examples are out there that plain don’t work, confusing the issue and wasting a lot of time. So in this article I’ll give an example of a fully working test Web page that saves an encrypted string to a SQL Server database table, and that also shows the decrypted field back to the user.

Continue reading “Example of Encrypting and Decrypting a String into a SQL Table Using ASP.NET”