I was searching for source code to upload a file into the server and I came across this url: http://support.microsoft.com/kb/323246 From my past experiance with microsoft/msdn, none are easy to understand and used. But for this article, I salute the author. You just need a little modification to suit .Net 3.5 (it is writen for 2.0). Upload is finish, back to bench and search for reading the file content. I guest stream writer play an important rules.
July 2008
July 23, 2008
July 18, 2008
Error: Inconsistent accessibility: parameter type is less accessible
Posted by Iso under C# | Tags: Parameter Type, Pass Value Between Form |Leave a Comment
If you got this type of error, just check back your class or object and change the accessibility. Meaning, if it is private, change to public. That’s all that you need to do. Other than that, I would like to share a tutorial/code on how you can pass value from one form to another. I used it to pass value from parent to child and vice versa. Still work although the example is made for .net 2005. Go to this url http://www.codeproject.com/KB/cs/pass_data_between_forms.aspx
July 18, 2008
Error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
Posted by Iso under Php | Tags: Syntax error |1 Comment
I just finish a simple web site. This site mainly for a survey purpose. Displaying the survey question is easy but the tricky part is the calculation. Beside than total up the value of each answer, I need to do some analysis. Not easy but I manage to crack it out. Use a bit of creativity, try n error and most of wandering in front of my notebook. Looking at the lcd screen hoping an idea pop out and helps me. That is done and really appreciate the think while walking and sleeping. Normal people would just simply think it is something like add or minus operation, but no. It is more than that. With all that I have gone through, I still manage to get this kind of error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING
Can you imagine that I spent almost one hour checking 200++ loc to see where I miss the syntax. Most of the forum that I search give feedback about missing a “.”
Here is the code:
$expr = “INSERT INTO tbla (matric, active, reflective, sensing, intuitive, visual, verbal, segmential, global) values(‘$_SESSION['matric']‘, ‘$active’, ‘$reflective’, ‘$sensing’, ‘$intuitive’, ‘$visual’, ‘$verbal’, ‘$segmential’, ‘$global’)”;
the solution:
$expr = “INSERT INTO tbla (matric, active, reflective, sensing, intuitive, visual, verbal, segmential, global) values(‘”.$_SESSION['matric'].”‘, ‘$active’, ‘$reflective’, ‘$sensing’, ‘$intuitive’, ‘$visual’, ‘$verbal’, ‘$segmential’, ‘$global’)”;
Can you see the different? Sure you can. I took that hole time just to find 10 second works. Hmm…
July 10, 2008
Beside than writing to an XML file, editing and deleting the content is important also. For the past week, I have been writing the code to edit and delete my xml node. This two web site have help me very much in figuring how to do this. Check it out