Technical

A potentially dangerous Request.Form value was detected from the client ASP.NET

I got this error message when I try to submit a form with HTML Code, the default settings of the .NET Framework will not allow me to submit HTML Code to prevent cross-site scripting (XSS) attacks.To avoid this error set Validate Request to false in the Page Directive.ValidateRequest="false" but this is...

How to remove HTML tags from string in C#

I will show you three different methods to remove HTML tags from string in C#:1. By using Regex:public static string RemoveHTMLTags(string html) { return Regex.Replace(html, "<.*?>", string.Empty); }2. By using Compiled Regex for better performance:static Regex htmlRegex = new Regex("<.*?>", RegexOptions.Compiled); public static string RemoveHTMLTagsCompiled(string html) { return htmlRegex.Replace(html, string.Empty); }3. By...

XML Data and Document Storage in SQL Server

XML is a platform-independent data representation format based originally on SGML. Since its popularization, it is becoming used as a data storage format. It has its own type system, based on the XML Schema Definition language (XSD). Both XML and XSD are W3C standards at the Recommendation level. An XML...

System Metadata Tables and INFORMATION_SCHEMA in SQL Server

Information about assemblies as well as the assembly code itself and the dependencies is stored in the system metadata tables, which, in general, store information about SQL Server database objects, such as tables and indexes. Some metadata tables store information for the entire database instance and exist only in the ...

Visual Studio 2005/2008 on Vista Internet Explorer cannot display the webpage

I faced a strange problem with Visual Studio 2005 and Visual Studio 2008 which is I have several ASP.NET Projects some of them using .NET 2.0 or Visual Studio 2005 and the others are using .NET 3.5 or Visual Studio 2008.The problem was when I try to run the Web...

How to Access controls on Master Pages from Content Pages in ASP .NET

We will assume that we have a Label control called "Label1" on your Master Page, you might want to change the text of that Label.To do that write this code in your content page:Label lbl = new Label(); lbl = (Label)Master.FindControl("Label1"); lbl.Text = "Text";Of course, this is all assuming the label is...