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

C#

 
GeneralDo I have to run an ActiveX in Visual Studio environment. Pin
anderslundsgard1-Aug-05 21:40
anderslundsgard1-Aug-05 21:40 
GeneralRe: Do I have to run an ActiveX in Visual Studio environment. Pin
Alomgir Miah2-Aug-05 3:24
Alomgir Miah2-Aug-05 3:24 
GeneralRe: Do I have to run an ActiveX in Visual Studio environment. Pin
anderslundsgard2-Aug-05 5:06
anderslundsgard2-Aug-05 5:06 
GeneralI cant catch specific exception Pin
Chetan Ranpariya1-Aug-05 21:37
Chetan Ranpariya1-Aug-05 21:37 
GeneralRe: I cant catch specific exception Pin
Mohamad Al Husseiny1-Aug-05 21:46
Mohamad Al Husseiny1-Aug-05 21:46 
GeneralRe: I cant catch specific exception Pin
Chetan Ranpariya1-Aug-05 22:37
Chetan Ranpariya1-Aug-05 22:37 
GeneralRe: I cant catch specific exception Pin
Mohamad Al Husseiny2-Aug-05 0:34
Mohamad Al Husseiny2-Aug-05 0:34 
GeneralRe: I cant catch specific exception Pin
Chetan Ranpariya2-Aug-05 1:01
Chetan Ranpariya2-Aug-05 1:01 
Following is the code that I am running in a clikc event of a button followed by the message that I am getting when the exception is caught.

private void bttnSaveUserPersonalInfo_Click(object sender,EventArgs e)
{
DataRowView drwNewUserPersonalInfo;
string strUserRoles = String.Empty;
try
{
drwNewUserPersonalInfo = dvUserPersonalInfo.AddNew();
drwNewUserPersonalInfo[0] = txtUserLoginID.Text;
drwNewUserPersonalInfo[1] = txtUserLoginPassword.Text;
drwNewUserPersonalInfo[2] = txtUserLastName.Text;
drwNewUserPersonalInfo[3] = txtUserFirstName.Text;
drwNewUserPersonalInfo[4] = txtUserMiddleName.Text;
drwNewUserPersonalInfo[5] = txtUserDateOfBirth.Text; drwNewUserPersonalInfo[6] = txtUserSSNumber.Text;
drwNewUserPersonalInfo[7] = cboUserMaritalStatus.SelectedValue.ToString();
drwNewUserPersonalInfo[8] = cboUserSex.SelectedValue.ToString();
drwNewUserPersonalInfo[9] = txtUserNationality.Text;
drwNewUserPersonalInfo[10] = txtUserAliasName.Text;
drwNewUserPersonalInfo[11] = txtUserCurrentLocale.Text;
drwNewUserPersonalInfo[12] = Session["UserID"].ToString();
drwNewUserPersonalInfo[13] = DateTime.Now;
drwNewUserPersonalInfo[14] = Session["UserID"].ToString();
drwNewUserPersonalInfo[15] = DateTime.Now;
drwNewUserPersonalInfo.EndEdit();
dstUserPersonalInfo.WriteXml(MapPath"./DataBase/UserPersonalDetails.xml"));
ViewState["NewUserLoginID"] = txtUserLoginID.Text;
}
catch(System.ArgumentException) //This exception is caught the message *
{
Response.Write(x.Message);
}
}

//Message displayed when ArgumentException is caught
System.FormatException: String was not recognized as a valid DateTime. at System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider, DateTimeStyles styles) at System.DateTime.Parse(String s, IFormatProvider provider) at System.Convert.ToDateTime(String value, IFormatProvider provider) at System.String.System.IConvertible.ToDateTime(IFormatProvider provider) at System.Convert.ToDateTime(Object value) at System.Data.Common.DateTimeStorage.Set(Int32 record, Object value) at System.Data.DataColumn.set_Item(Int32 record, Object value)Couldn't store <> in USER_DOB Column. Expected type is DateTime.


Plz review this code try to get the solution.
Thankin u
GeneralRe: I cant catch specific exception Pin
Mohamad Al Husseiny2-Aug-05 2:19
Mohamad Al Husseiny2-Aug-05 2:19 
GeneralRe: I cant catch specific exception Pin
Chetan Ranpariya2-Aug-05 3:41
Chetan Ranpariya2-Aug-05 3:41 
GeneralWindows Service Installation problems Pin
asifrogers1-Aug-05 21:25
asifrogers1-Aug-05 21:25 
GeneralC# Graphics locking to x, y, cordinates of other graphics Pin
nexus-solutions1-Aug-05 20:48
nexus-solutions1-Aug-05 20:48 
GeneralRe: C# Graphics locking to x, y, cordinates of other graphics Pin
Christian Graus2-Aug-05 2:09
protectorChristian Graus2-Aug-05 2:09 
GeneralRe: C# Graphics locking to x, y, cordinates of other graphics Pin
Anonymous2-Aug-05 17:27
Anonymous2-Aug-05 17:27 
GeneralRe: C# Graphics locking to x, y, cordinates of other graphics Pin
Christian Graus2-Aug-05 17:47
protectorChristian Graus2-Aug-05 17:47 
Generaldisappearing image in toolbar Pin
nidhelp1-Aug-05 20:47
nidhelp1-Aug-05 20:47 
GeneralClient queue for a web application Pin
eyoung701-Aug-05 19:35
eyoung701-Aug-05 19:35 
GeneralRe: Client queue for a web application Pin
eyoung703-Aug-05 16:14
eyoung703-Aug-05 16:14 
GeneralRe: Client queue for a web application Pin
eyoung704-Aug-05 16:06
eyoung704-Aug-05 16:06 
QuestionBase class method call ? Pin
chettu1-Aug-05 19:21
chettu1-Aug-05 19:21 
AnswerRe: Base class method call ? Pin
S. Senthil Kumar2-Aug-05 2:11
S. Senthil Kumar2-Aug-05 2:11 
AnswerRe: Base class method call ? Pin
Christian Graus2-Aug-05 2:13
protectorChristian Graus2-Aug-05 2:13 
GeneralRe: Base class method call ? Pin
chettu2-Aug-05 2:34
chettu2-Aug-05 2:34 
GeneralRe: Base class method call ? Pin
Christian Graus2-Aug-05 14:09
protectorChristian Graus2-Aug-05 14:09 
GeneralProblem with PrintPreviewDialog Pin
kbalias1-Aug-05 19:21
kbalias1-Aug-05 19:21 

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.