To convert a string into an Enum: myClass.GeomType = (Display.GeomType)Enum.Parse(typeof(Display.GeomType), myGeomType.ToString(), true); To convert an Enum into a string: string test = myClass.GeomType.ToString();
Tuesday, September 22, 2009
Converting a string into an Enum
Sunday, September 20, 2009
Google Analytics/Google Webmaster Tools
A while ago I started using Google Analytics. It was really easy to set up, and it gives you useful information, like: 1) site usage statistics OK, I agree this is information that you could retrieve with other commercial software. However, Google Analytics provides you with easy-to-read reports, and it's free (of course, you should be willing to share the collected information with Google). You can even build custom reports!! In fact, I just read something about Google Webmaster Tools. I'll give it a try!
2) visitor profile information (like location)
3) browser used
4) Navigation analysis
Saturday, September 12, 2009
JayRock vs AjaxPro
Personally, I prefer AjaxPro. It gives you the flexibility of passing a dataset, and it also provides you a cleaner way to wrap the data you want to pass around. Check out AjaxPro here.
Passing custom classes to a web service
This article can help you: http://www.dalepreston.com/Blog/2005/02/passing-classes-from-webservices-part.html
Basically, you need to do the following in the file Refence.cs:
1) Delete any references to XmlIncludeAttribute
2) Qualify your classes with the correct namespace (if necessary)
3) Remove the custom class declaration (I had to do this since I already had the class defined in my VS solution. In other words, I had access to the custom class in both the client and server application).
The other option is to write the proxy classes yourself, but I didn't try this.
Thursday, September 10, 2009
Overloading web methods in Visual Studio 2005
It's really simple, you just need to replace withWebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[WebServiceBinding(ConformsTo = WsiProfiles.None)]
I found this information here.