Solved

ascii charact coming back from database.

Posted on 2009-05-11
6
152 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
  • 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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now