Solved

ascii charact coming back from database.

Posted on 2009-05-11
6
157 Views
Last Modified: 2012-05-06
I have the following:
     txtProblem.Text = TicketDS.Tables[0].Rows[0]["ProblemNote"].ToString();
=========================================================
Customer email:
I don't think we have received the summary/detail usage stats & bill for lat month (Feb).  Was this an oversight ?
Did this go out? Can you please re- send to them. Is it possible to make sure that they get the usage report every month. Thanks
======================================================


'

Open in new window

0
Comment
Question by:mathieu_cupryk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 9

Expert Comment

by:tillgeffken
ID: 24356275
Is this data coming like that from db or are you doing any sort of HtmlEncode or alike with it before displaying?
0
 
LVL 27

Expert Comment

by:nmarun
ID: 24356278
Try this:

 txtProblem.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ProblemNote"].ToString());

Open in new window

0
 
LVL 27

Expert Comment

by:nmarun
ID: 24356285
You need to include the System.Web namespace to use the above.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:mathieu_cupryk
ID: 24356822
if (TicketDS != null && TicketDS.Tables.Count != 0 && TicketDS.Tables[0].Rows.Count > 0)
            {
                txtActionTaken.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ActionNote"].ToString());
                TicketNumber.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TicketNumber"].ToString());
                txtClosedBy.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["AgentClosed"].ToString());
                txtCreatedBy.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["AgentCreated"].ToString());
                txtDateAssigned.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateAssigned"].ToString());
                txtDateClosed.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateClosed"].ToString());
                txtDateCreated.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateCreated"].ToString());
                txtDateFollowup.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["FollowupBy"].ToString());
                txtExternalTicket.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ExternalTicket"].ToString());
                txtFollowupNotes.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["FollowupNote"].ToString());
                txtLastUpdate.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["DateLastModified"].ToString());
                txtProblem.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ProblemNote"].ToString());
                txtShortDescription.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["ShortDescription"].ToString());
                txtSolution.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["SolutionNote"].ToString());
                txtSubmitVia.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TicketApplicationType"].ToString());
                txtTrackIt.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["TrackIt"].ToString());
                txtUserID.Text = HttpUtility.HtmlDecode(TicketDS.Tables[0].Rows[0]["UserID"].ToString());
                uxLookupFieldTicketStatus1.DefaultValue = TicketDS.Tables[0].Rows[0]["TicketStatus"].ToString();
                uxLookupFieldTicketAgentFolowup1.DefaultValue = TicketDS.Tables[0].Rows[0]["AgentFollowup"].ToString();
                uxLookupFieldTicketType1.DefaultValue = TicketDS.Tables[0].Rows[0]["TicketType"].ToString();
                uxLookupFieldTicketServiceImpact1.DefaultValue = TicketDS.Tables[0].Rows[0]["ServiceImpact"].ToString();
                uxLookupFieldTicketLocationSIMs1.DefaultValue = TicketDS.Tables[0].Rows[0]["LocationSIMs"].ToString();
                uxLookupFieldTicketRequestType1.DefaultValue = TicketDS.Tables[0].Rows[0]["RequestType"].ToString();
                uxLookupFieldTicketPriority1.DefaultValue = TicketDS.Tables[0].Rows[0]["Priority"].ToString();
                uxLookupFieldTicketContactMethod1.DefaultValue = TicketDS.Tables[0].Rows[0]["ContactMethod"].ToString();
                uxLookupFieldTicketAssignedTo.DefaultValue = TicketDS.Tables[0].Rows[0]["AssignedTo"].ToString();
            }
           

is it ok for each textbox that is being assigned,
0
 
LVL 27

Accepted Solution

by:
nmarun earned 500 total points
ID: 24359253
Looks good.. are you still having that issue?
0
 

Author Closing Comment

by:mathieu_cupryk
ID: 31580215
Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question