ows = Open Geospatial Consortium Web Service
Read more about XML Prefixes
So, this ows is NOT part of SharePoint internal field name.
Short post, just feel a bit irritated when someone try to mislead me. On top of that, found a good reference list for SharePoint internal field names.
Typically, using object.ToString() method will cause error if the object is null or empty. Here is the quick workaround:
public static string ToSafeString(this object obj)
return (obj ?? string.Empty).ToString();
I posted the similar one for VB before here.
I want to store xml in a SQL column type TEXT. I able to output the file properly as .xml file. But when I insert into database, I notice there is ‘special’ characters in front my xml.
After quick searching, found out it is actually a representation of Byte Order Mark(BOM) by encoding utf-8. More details in the Wiki
So, let’s jump into workaround to avoid the BOM ï»¿ appearing.
Dim stream As New System.IO.MemoryStream
Dim uft8 As New System.Text.UTF8Encoding(False)
Dim xmlWriter As New XmlTextWriter(stream, uft8)
In the UTF8Encoding Constructor, just set the encoderShouldEmitUTF8Identifier boolean to false. Done.
Ever get this error when opening a .csv file?
“Excel has detected that ‘xxx.csv’ is a SYLK file, but cannot load it. Either the file has errors or it is not a SYLK file format. Click OK to try to open the file in a different format.”
This happens when the first 2 characters in the file are “ID” (Capital). This will actually cost Excel use that as an indicator that the file is SYLK (SYmbolic LinK). So, the solution is actually just as simple as renaming the first 2 characters other than “ID”. Lower case “id” will works too.
Interesting article found in MSDN magazine about web application performance.
- Common ASP.NET performance myths
- Useful performance tips and tricks for ASP.NET
- Suggestions for working with a database from ASP.NET
- Caching and background processing with ASP.NET
Reference: Tips for Writing High-Performance Web Applications
I bet most people aware that direct convert an empty object using ToString() will throw exception. A typical way to overcome this is to check if the object is empty, return an emptry string instead. Easily done on C#, today was trying to achive the same with vb.
Private Function ToSafeString(ByVal obj As Object) As String
If obj Is Nothing Then
Being so use with C# “null”, found out in vb is “Nothing”.
Examples on the following link is clear enough.
Reference: MSDN: ref (C# reference)
A good reference site explaining how Runtime locates Assemblies at MSDN. I was wondering when building my solution, it’s not taking the updated dlls. Apparently, the runtime is using the assemblies from GAC. Uninstalling it from GAC solved the issue.