ASP.NET - Currency symbol not showing in the label

Asked By Vimal Sharma
03-Feb-12 02:39 AM
lblPrice.Text = string.Format("{0:C2}", Session["TotalOrderAmount"].ToString());

not working
  Web Star replied to Vimal Sharma
03-Feb-12 02:42 AM
you need to check setting for culture in web.config
<system.web>
   
<globalization culture="auto" uiCulture="auto"/>
</system.web>
  Reena Jain replied to Vimal Sharma
03-Feb-12 02:43 AM
HI,

try the below
You can use string.Format("{0:c}", value).

  Vimal Sharma replied to Reena Jain
03-Feb-12 02:59 AM
Thanks Reena
Create New Account
help
in Sql server as var_name int How do you separate business logic while creating an ASP.NET application? There are two level of asp.net debugging 1. Page level debugging For this we have to edit the page level debugging enable the trace to true in the line in the html format of the page. %@ Page Language = ”vb” trace = ”true”AutoEventWireup = ”false” Codebehind = ”WebForm1.aspx.vb” Inherits The control itself will take care of the date display How can you deploy an asp.net application ? You can deploy an ASP.NET Web application using any one of the following three deployment options. a) Deployment using
Globalization in currency in asp.net I have a website but i want that if its access in US then it shows the currency in dollar and if its access in India then its shows the currency in Ruppes and if its access in Europe and in pound. So how i apply or you can in first combo take the country names and in second take the currency they have and bind it this way: In first combo select bind all country names SqlConnection conn = new SqlConnection (); conn.ConnectionString = ConfigurationManager .ConnectionStrings[ "ConnectionString" ].ConnectionString; SqlDataAdapter da = new SqlDataAdapter ( "select currency from table1 where Country = '" + s + "'" , conn); DataSet ds = new DataSet (); da.Fill(ds); / / Fill the dataset DropDownList2.DataSource = ds; DropDownList2.DataTextField = "currency" ; DropDownList2.DataValueField = "currency" ; DropDownList2.DataBind(); } Try like this- <%@ Page Language = "C#" uiculture = "auto" %> <%@ Import Namespace
curreny format hello, i am using a currency format in asp.net which is lblPrice.Text = String.Format("{0:c}", price); but its returning the Euro sign, not doller($) sign. i want currency format with doller sign, how to do this. Thanks in advance Hi, If you always want
please guide me, how we can use Calendar control in MVC3 Razor view engine in Asp.net? Thanks This tutorial will teach you the basics of how to work with editor templates, display templates, and the jQuery UI datepicker popup calendar in an ASP.NET MVC Web application. « Previous Tutorial | Next Tutorial » This tutorial will teach you the basics of work with editor templates, display templates, and the jQuery UI datepicker popup calendar in an ASP.NET MVC Web application. For this tutorial, you can use Microsoft Visual Web Developer 2010 Express install the required software using the following links: • Visual Studio Web Developer Express SP1 prerequisites • ASP.NET MVC 3 Tools Update • SQL Server Compact 4.0 (runtime + tools support) If you're
things like which language a particular string is shown but also things like the date format used, the decimal separator, currency symbol, and so on. Culture and UICulture In ASP.NET, you can set to two culture values: the Culture and UICulture properties. The Culture value determines things such as date, number, currency formatting, and so on. For example, it is the Culture setting that decides whether the date is in the dmy format or mdy format and what names to use for the month and for numeric values what the decimal