Click here to Skip to main content
15,879,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello All,

I have a textbox with multiline in my page. I am inserting this textbox value into gridview or database. I have given one tag like <br> in textbox and clicked on submit. It is giving an error like below


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


Is it possible to insert tags like ("<br>")...

Please suggest.

Thank you.
Posted
Updated 4-Apr-13 23:59pm
v4

Hi NaVen. See the following

1. If using any Ajax Toolkit/ Update panels? Then set EnablePartialRendering to false in the ScriptManager for the page, and then it should give you the actual error.

2. In the web.config file, try playing with maxRequestLength value.

3. In ASP.Net 4.0 applications, add ValidateRequest="false" on the page and also
add the below tag in web.config file
<httpruntime maxrequestlength="102400" requestvalidationmode="2.0" />


May I know your application version? .Net 2.0/3.5/4.0

Thank you
Vamsi
 
Share this answer
 
Comments
NaVeN Kumar 5-Apr-13 3:16am    
.Net 4.0... Yes,I have placed this text box control in updatepanel.
NaVeN Kumar 5-Apr-13 3:27am    
do i need to change requestvalidationmode as "4.0" as my version is .Net 4.0?
Hi dear,
Textboxes won't allow tags.If you wanna insert tags('br') in database , gridview etc you should use "& lt br & gt". Here "& lt"[without space between '&' and 'lt'] will be taken as "<" symbol and "& gt" is taken as ">" symbol.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900