Google Brother Up

Showing posts with label Error in Program. Show all posts
Showing posts with label Error in Program. Show all posts

2009/02/13

A potentially dangerous Request.Form value was detected from the client... (Solution - Solved)

When you come across an error saying "A potentially dangerous Request.Form value was detected from the client..." you can be very sure that you need to do 2 things to solve it.

1) Set the aspx page set ValidateRequest="false" so that the page directive looks like this: - {%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddPressRelease.aspx.cs"
Inherits="AddPressRelease" ValidateRequest="false" %}

2) While submitting the page inside the submit method html encode all textboxes like below: -

objPressReleaseBO.Title = Server.HtmlEncode(txtTitle.Value);
objPressReleaseBO.Description = Server.HtmlEncode(txtDescription.Value);

Your problem will be solved. :)

186 unique visitors

2008/11/26

Sys.WebForms.PageRequestManagerServerErrorException:

Problem: - Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500

Solution: -

In the @Page tag set 

ValidateRequest="false"

When does it occur?

This normally occurs when there is 
1) a multiline textbox in the page
2) an update panel in the page inside which the multiline textbox resides

121 unique visitors

2008/05/08

THIS DATASOURCE DOES NOT SUPPORT SERVER-SIDE DATA PAGING

To solve this problem (THIS DATASOURCE DOES NOT SUPPORT SERVER-SIDE DATA PAGING ), you must set GridView DataSource Property as DataSet not DataReader .

Drop Down List

1. http://www.janetsystems.co.uk/Articles/NetArticles/tabid/74/itemid/161/modid/449/Default.aspx