Jul
5
2013
C#

How to convert from string currency to double in C#

Follow one simple line of C# code to convert from a string currency to double.  var strCurrency = "$103,02.54"; var dOutput = double.Parse(strCurrency, NumberStyles.Currency); dOutput is now holding value: 10302.54 NumberStyles.Currency using have namespace: using System.Globalization;
Oct
23
2012
ASP.NET // C#

Get html input text values in asp.net C# code behind

Here is how to get html input text values with out having runat="server" from asp.net c# code behind.   Example:   Front-end (.aspx) page: <input type="text" id="text1" name="text1" /> <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />   Back-end (.aspx.cs) page:  protected void Button1_Click(object sender, EventArgs e) { string getTextValues = Request["text1"].Trim();  }    OR: protected void Button1_Click(object sender, EventArgs e) { string getTextValues = Page.Request.Form["text1"].ToString();  }

Calendar

<<  December 2020  >>
MoTuWeThFrSaSu
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

View posts in large calendar