Click here to Skip to main content
15,908,013 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am new to c# asp.net and my job is to understand the existing code and make changes for new requirement's.

I have a web form were one of the field is a textbox(purpose:users writes description of the issue in this area in the following format "")

Issue: I cant save the form when I write the text format "" please let me know if the text can be saved in the issue format I described above if so kindly let me know the solution..

Note: Sql databse is used as a backend to save the data.

If I am missing any details or info to be shared pl let me know..thanks in advance.

I would like to make share here my findings I able to save the data in the following format 1.< save text in this description area> [here I had a space in between < and save] 2." save text in this description area> [here I did not put any < sign at the start]
Posted
Comments
AshwinGuddeti 19-Jan-15 7:15am    
Hi..
here my client writes the description in the testbox in the following format only <save text="" here="" description=""> however I have given a alternate solution to save the data < where it saves in the database as <(hope its a Unicode its helping it save)

here its not at all about data going to database level.when I put debug point I don't see the data after writing in the text box in the following format <save text="" description=""> at textdescription.text point it is throwing the
error:Unhandled exception at line 513, column 13 in http://localhost:49324/ScriptResource.axd?d=_BVt7geeKdNNKmH7keWQloB-_UhjxiXbsGvwwI4Nf-rlBuVWM9ArL-IAom0FNi09x8WkOspWA06P0X1GTZX5V7x8SdidNMN4ovpT3vA3PCbuD3wOqM71GBfhofIYkBv9dhBdWDlNVzxLNDPKGMwCaeSZW3dOPPY_bC1KRvCmRm4LLy_d0&t=fffffffff98cfb72

0x800a139e - JavaScript 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

Note: I am able to save and see the data if the text format is "< save text description>" here if you observe there space between < and save so here in these case the data is saved and seen at the debug point textdescription.text

May be issue in the special characters using in the textbox. Please try without special character and let u try to save if u can save means ..

check database ur column datatype if nvarchar means no issues otherwise change into nvarchar datatype..

and now try with special characters..

All the Best :)
 
Share this answer
 
Generally special character issue occurs when not use nvarchar as a data type in Sql server.So just try nvarchar it will solve your problem.
 
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