Click here to Skip to main content
16,016,562 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi i create a cookie and set it with persian font but when i wanna read from cookie and show it in a lable , the words dont present in correct formats. what is the problem
HttpCookie ck;
  ck = Request.Cookies["userauth"];
    userlbl.Text = ck["user"].ToString();

             userlbl.Text = ck["FullName"];
             statelbl.Text = ck["StateName"];
             TxtBranchname.Text = branchnamelbl.Text = ck["BranchName"];
             TxtBranchcode.Text = branchcodelbl.Text = ck["BranchCode"];
Posted

1 solution

Cookies do not hold fonts - they hold a string of text. If you want to store font based information in there, you have to explicitly set it into the cookie as a string: I would suggest having two cookies, one to hold the text, and one to hold the font information. You would then need to set the font yourself from the string returned by the cookie.
 
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