July 20, 2012

ASP.NET 4.0 Potentially dangerous Request.Form value was detected

When we are trying to save HTML content from textbox or any editor to database. we might come across an issue "potentially dangerous Request.Form value was detected"

In case of Framework 2.0 Add ValidateRequest="false" in particular page like this
<%@ Page Language="C#" MasterPageFile="admin.master" AutoEventWireup="true" CodeFile="Test.aspx.cs" ValidateRequest="false" Inherits="Test" %>

OR
 if we need to declare globally add this in web.config
<pages validateRequest="false" /> under <system.web> section
This should work in .Net 2.0

In case of Framework 4.0
Above said alone will not work. Additionally add following in the web.config
<httpRuntime requestValidationMode="2.0"/>

After adding these things, it should go smooth.

jquery intellisense visual studio 2010

Here we can see about how to enable intellisense in visual studio 2010.

Just download the latest Jquery from the sites following:
After download please add to any folder in your website. After adding you should see similar to this.


Please add VSDoc file along with that jquery library file to provide support for intellisense. Here I have added the Jquery Version 1.7.2, you can add any version you like. So I also added the corresponding version of VSDoc. VSDoc is available for all versions of Jquery around the internet.

After adding files to the folder, please add reference to the file where you are going to write the Jquery code. After referring you should see the intellisense similar to this.

Here i have created a file script.js where i am going to write all jquery code for my website. So I am adding reference here. After referring, my file looks like this. I added reference by simply dragging and dropping the file inside my script.js, it will automatically get referred.


Here after we will get the intellisense like above image.
Reference: VS2010 Tips #7


Website Optimization - Search Engine Optimization - SEO


Search Engine Optimization - SEO is one of the ethical methodologies followed by the search engines for the purpose of gaining traffic and to the visibility of the visitor to his relevant search terms. Search Engine Optimization(SEO) enables a person or organization with presence on the web to get good ranking.
A search engine is a pre-written automated algorithmic tool which provides answers to the queries and replies to the suggestions and comments of the user. The typical search query is commonly known as "search term" or "keyword". Search Engine Optimization(SEO) is a way to make a website highly ranked in major search engines like Google, Yahoo, MSN, Alta vista, Miva, ask etc,.

Search engine is a doorway or hall way to find the necessary potential of a product or your services or some other needs through global access. Search engine is also a mode of communication through which a marketing business has its products or sales and services qualities is done for a consumer. Search engine Optimization(SEO) is also a way to find the competitors of a business from search engine.
While in the way of internet, each and every business needs to overcome their competitors and also their advantages and offers should reach the consumer completely as soon as possible. For this process the website has to be highly ranked in the search engines and to be attractive to the visitor. This process of optimizing a website is called Search Engine Optimization(SEO).

1. First the search engine has to crawl the website using their crawlers called robots. The names of the robots may vary accordingly to the different search engines. GOOGLE robots are called as "googlebot" and for YAHOO is "slurp" and for MSN is "scooter".

2. These robots will make a surf in the internet daily, since a human can't surf the internet which has over 20 million pages daily added and updated. But these robots will surf them quickly and also by 24/7 routine for the new entry of the websites.

3. After crawling the websites, the robots take an archive of each and every page of the website. And moreover these robots used to crawl a website for which the content is often updated. Robots are content lovers.

4. These robots also make a note of the available number of backlinks to a website and these plays one important role in the ranking of the website.

5. The pages that are crawled by the robots are stored in a index under a large database and can be retrieved at any time of necessary.

6. whenever a visitor enters into a search engine's query with a search term, these robots will have a look over the terms and displays the results from the database with those relevant search terms accordingly.

7. The robots which notifies the back links of a website should be of high quality with good page rank and important is to be not considered as spam or malware sites.

Ultimately it is essential that your website is well targeted to find the right clients through search engines. Search Engine Optimization(SEO) is a combined effort of the site owner and the vendor.
This article is written by Bala Sathya Narayanan SEO Professional.