Wednesday, March 21, 2007
Wednesday, March 14, 2007
I really get surprised about the following behaviour:
when I've tried to use the follwoing line of code:
if(!int.TryParse(row["myRowName"] as string, out myDefinedInt))
tryParse always returned me false and I assinged a default value. After making sure that all my rows have values for myRowName I were confused.
a friend suggested to use row["myRowName"].ToString() and voila it worked like i wanted.
I didn't really figured out why that happens, then in none of my cases the value were empty that my expression as string would return null.
here a bit more code:
DataSet data = DataReader.GetData();
DataTable tab = data.Tables["MyTableName"];
DataView view = tab.DefaultView;
view.RowFilter = "RowNameA LIKE '%" + valA + "%' AND RowNameB LIKE '%" + valB + "%'";
if (view.Count > 0)
foreach (DataRowView row in view)
item = new Data.MyDataObject();
item.SomeValue1 = row["SomeValue1"] as string;
item.SomeValue2 = row["SomeValue2"] as string;
int outData = -1;
if (!int.TryParse(row["SomeValue3"].ToString(), out outData))
item.SomeValue3 = 40;
item.SomeValue3 = outData;
etc ... etc ... etc ...
Thanks to richi (Y)
Saturday, March 10, 2007
after a while i finally figured out what i have missed to prevent emails to sent twice - once over the control and once over my own logic.
protected void PasswordRecovery_SendingMail(object sender, MailMessageEventArgs e)
e.Cancel = true;
.. here my own logic starts.
in the web.config file you need minimum the following configuration:
<smtp from="your email address">
.. evoila.. that's all - happy email sending.
Friday, March 09, 2007
the msdn bible contains everything:
System Error Codes
The following topics provide lists of system error codes. These values are defined in the WinError.h header file.
- System Error Codes (0-499)
- System Error Codes (500-999)
- System Error Codes (1000-1299)
- System Error Codes (1300-1699)
- System Error Codes (1700-3999)
- System Error Codes (4000-5999)
- System Error Codes (6000-8199)
- System Error Codes (8200-8999)
- System Error Codes (9000-11999)
- System Error Codes (12000-15999)