Click here to Skip to main content
15,891,943 members
Home / Discussions / C#
   

C#

 
QuestionC# string conversion issues Pin
gtr197129-Nov-09 5:14
gtr197129-Nov-09 5:14 
AnswerRe: C# string conversion issues Pin
Dave Kreskowiak29-Nov-09 5:26
mveDave Kreskowiak29-Nov-09 5:26 
GeneralRe: C# string conversion issues Pin
gtr197129-Nov-09 5:33
gtr197129-Nov-09 5:33 
GeneralRe: C# string conversion issues Pin
Richard MacCutchan29-Nov-09 5:46
mveRichard MacCutchan29-Nov-09 5:46 
AnswerRe: C# string conversion issues Pin
PIEBALDconsult29-Nov-09 5:50
mvePIEBALDconsult29-Nov-09 5:50 
GeneralRe: C# string conversion issues Pin
gtr197129-Nov-09 5:56
gtr197129-Nov-09 5:56 
GeneralRe: C# string conversion issues Pin
Natza Mitzi29-Nov-09 6:10
Natza Mitzi29-Nov-09 6:10 
GeneralRe: C# string conversion issues Pin
gtr197129-Nov-09 6:20
gtr197129-Nov-09 6:20 
Thanks, Natza - but I don't understand what you mean by "culture".

Here's what I'm working with, all under a Button_Click void. I've got an ASP page interacting with this back code. The user enters a number string in a textbox, I want to convert that string into a double and do a calculation. I don't want to test the input here for a boolean yes/no, I want to convert the string a use it.

-------------------
protected void btnCalc_Click(object sender, System.EventArgs e)
{

String sName = (txtName.Text);
String sEarnings = (txtEarnings.Text);
String sHealth = (txtHealth.Text);
String s401k = (txt401k.Text);

dEarn = Convert.ToDouble(sEarnings);
dHealth = Convert.ToDouble(txtHealth.Text);
d401k = Convert.ToDouble(txt401k.Text);

<other code,="" etc....="">

}
--------------------------
GeneralRe: C# string conversion issues Pin
Richard MacCutchan29-Nov-09 6:23
mveRichard MacCutchan29-Nov-09 6:23 
GeneralRe: C# string conversion issues Pin
Natza Mitzi29-Nov-09 6:32
Natza Mitzi29-Nov-09 6:32 
GeneralRe: C# string conversion issues Pin
PIEBALDconsult29-Nov-09 11:39
mvePIEBALDconsult29-Nov-09 11:39 
AnswerRe: C# string conversion issues Pin
Natza Mitzi29-Nov-09 6:34
Natza Mitzi29-Nov-09 6:34 
QuestionHow to creat a Hash Role programmatically Pin
Mehrdad Seyrafi29-Nov-09 0:31
Mehrdad Seyrafi29-Nov-09 0:31 
AnswerRe: How to creat a Hash Role programmatically Pin
Dave Kreskowiak29-Nov-09 5:25
mveDave Kreskowiak29-Nov-09 5:25 
AnswerRe: How to create a Hash Role programmatically Pin
Mehrdad Seyrafi29-Nov-09 19:50
Mehrdad Seyrafi29-Nov-09 19:50 
GeneralRe: How to create a Hash Role programmatically Pin
Dave Kreskowiak30-Nov-09 14:46
mveDave Kreskowiak30-Nov-09 14:46 
QuestionDatagridview sorting problem Pin
Yulianto.28-Nov-09 19:43
Yulianto.28-Nov-09 19:43 
AnswerRe: Datagridview sorting problem Pin
Yuri Vital28-Nov-09 23:42
Yuri Vital28-Nov-09 23:42 
GeneralRe: Datagridview sorting problem Pin
Yulianto.29-Nov-09 0:35
Yulianto.29-Nov-09 0:35 
QuestionReplace a letter in a Textbox? Pin
ahlm28-Nov-09 11:08
ahlm28-Nov-09 11:08 
AnswerRe: Replace a letter in a Textbox? Pin
Luc Pattyn28-Nov-09 11:12
sitebuilderLuc Pattyn28-Nov-09 11:12 
GeneralRe: Replace a letter in a Textbox? Pin
ahlm28-Nov-09 11:13
ahlm28-Nov-09 11:13 
GeneralRe: Replace a letter in a Textbox? Pin
Luc Pattyn28-Nov-09 11:28
sitebuilderLuc Pattyn28-Nov-09 11:28 
GeneralRe: Replace a letter in a Textbox? Pin
ahlm28-Nov-09 11:42
ahlm28-Nov-09 11:42 
GeneralRe: Replace a letter in a Textbox? Pin
Luc Pattyn28-Nov-09 11:54
sitebuilderLuc Pattyn28-Nov-09 11:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.