Click here to Skip to main content
16,006,883 members
Home / Discussions / C#
   

C#

 
GeneralRe: Rounding off integers Pin
MoustafaS7-May-05 11:17
MoustafaS7-May-05 11:17 
Generalquestion about bandobjects (toolbar for IE) Pin
Green Fuze7-May-05 8:31
Green Fuze7-May-05 8:31 
GeneralWindows Service - starnge stopping behaviour Pin
Member 14523617-May-05 8:02
Member 14523617-May-05 8:02 
Generaldata formatting in a textbox using c# Pin
NormBohana7-May-05 6:59
NormBohana7-May-05 6:59 
GeneralRe: data formatting in a textbox using c# Pin
Polis Pilavas7-May-05 14:13
Polis Pilavas7-May-05 14:13 
GeneralRe: data formatting in a textbox using c# Pin
NormBohana7-May-05 14:55
NormBohana7-May-05 14:55 
GeneralRe: data formatting in a textbox using c# Pin
Polis Pilavas7-May-05 14:59
Polis Pilavas7-May-05 14:59 
GeneralRe: data formatting in a textbox using c# Pin
NormBohana8-May-05 8:12
NormBohana8-May-05 8:12 
Thanks again for you help. Your suggection did not work, I am including some code to give you an idea of what I am trying to do. I am trying to insert a record into a SQL table, it works now I am trying to format the phone numbers. All I get is the format. I hope this helps.

//
// sqlInsertCommand1
//
int rsIdentity;

String format = "(###) ###-####";

SqlCommand cmdGetIdentity = new SqlCommand();

System.Text.StringBuilder b;

try
{
b = new System.Text.StringBuilder(" ");

txtNpets.Text = Convert.ToString(0);
txtHphone.Text = format.ToString();

b.Append("INSERT INTO [owner-info] (salutation, [owner-fname], [owner-lanme], [owner-address] , [owner-city], [owner-state], [owner-zipcode], [owner-home-phone], [owner-work-phone] , [owner-cell-phone], [owner-emgr-phone], [owner-emgr-contact], [owner-email] , [owner-fax-number], [owner-refered-by], pets) values('");
b.Append(txtSal.Text);
b.Append("','");
b.Append(txtFname.Text);
b.Append("','");
b.Append(txtLname.Text);
b.Append("','");
b.Append(txtAddress.Text);
b.Append("','");
b.Append(txtCity.Text);
b.Append("','");
b.Append(txtState.Text);
b.Append("','");
b.Append(txtZcode.Text);
b.Append("','");
b.Append(txtHphone.Text);
b.Append("','");
b.Append(txtWphone.Text);
b.Append("','");
b.Append(txtCphone.Text);
b.Append("','");
b.Append(txtEphone.Text);
b.Append("','");
b.Append(txtEcontact.Text);
b.Append("','");
b.Append(txtEmail.Text);
b.Append("','");
b.Append(txtFphone.Text);
b.Append("','");
b.Append(txtRefered.Text);
b.Append("','");
b.Append(txtNpets.Text);
b.Append("') SELECT @@IDENTITY ");

sqlInsertCommand1.CommandText=b.ToString();
this.sqlConnection1.Open();
sqlInsertCommand1.ExecuteNonQuery();

GeneralRe: data formatting in a textbox using c# Pin
Polis Pilavas8-May-05 9:48
Polis Pilavas8-May-05 9:48 
GeneralRe: data formatting in a textbox using c# Pin
NormBohana8-May-05 16:26
NormBohana8-May-05 16:26 
GeneralRe: data formatting in a textbox using c# Pin
Polis Pilavas9-May-05 1:36
Polis Pilavas9-May-05 1:36 
GeneralRe: data formatting in a textbox using c# Pin
NormBohana9-May-05 5:52
NormBohana9-May-05 5:52 
GeneralRe: data formatting in a textbox using c# Pin
Polis Pilavas9-May-05 9:38
Polis Pilavas9-May-05 9:38 
GeneralReading eno from Xml file and display in label of WInform Pin
ksanju10007-May-05 3:48
ksanju10007-May-05 3:48 
GeneralImage Processing Question Pin
Meysam Mahfouzi7-May-05 2:35
Meysam Mahfouzi7-May-05 2:35 
GeneralRe: Image Processing Question Pin
ekynox7-May-05 2:48
ekynox7-May-05 2:48 
QuestionDo you think this is stupid ? Pin
Sharpoverride7-May-05 2:30
Sharpoverride7-May-05 2:30 
AnswerRe: Do you think this is stupid ? Pin
Colin Angus Mackay7-May-05 2:58
Colin Angus Mackay7-May-05 2:58 
GeneralRe: Do you think this is stupid ? Pin
Sharpoverride7-May-05 3:00
Sharpoverride7-May-05 3:00 
GeneralRe: Do you think this is stupid ? Pin
Colin Angus Mackay7-May-05 3:23
Colin Angus Mackay7-May-05 3:23 
GeneralRe: Do you think this is stupid ? Pin
Sharpoverride7-May-05 3:26
Sharpoverride7-May-05 3:26 
GeneralRe: Do you think this is stupid ? Pin
Colin Angus Mackay7-May-05 3:37
Colin Angus Mackay7-May-05 3:37 
GeneralRe: Do you think this is stupid ? Pin
Sharpoverride7-May-05 3:42
Sharpoverride7-May-05 3:42 
AnswerRe: Do you think this is stupid ? Pin
Daniel Turini7-May-05 3:41
Daniel Turini7-May-05 3:41 
GeneralRe: Do you think this is stupid ? Pin
Sharpoverride7-May-05 3:44
Sharpoverride7-May-05 3:44 

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.