Link to home
Start Free TrialLog in
Avatar of mathieu_cupryk
mathieu_cuprykFlag for Canada

asked on

ascii charact coming back from database.

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

Avatar of tillgeffken
tillgeffken

Is this data coming like that from db or are you doing any sort of HtmlEncode or alike with it before displaying?
Try this:

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

Open in new window

You need to include the System.Web namespace to use the above.
Avatar of mathieu_cupryk

ASKER

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,
ASKER CERTIFIED SOLUTION
Avatar of nmarun
nmarun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks.