Search

You searched for the word(s): userid:666018

Matching Posts

  • Re: Best practices / classes to use?

    public string test( string connectionString, string Query) { string ret = "" ; try { using (SqlConnection conn = new SqlConnection(connectionString)) { using (SqlCommand cmd = new SqlCommand(Query, conn)) { XmlTextReader reader = cmd.ExecuteXmlReader(); reader.Read(); while (reader.ReadState != ReadState.EndOfFile) { ret += reader.ReadOuterXml(); } } } } catch ( Exception ex) { throw ; } return ret; }
    Posted to XML Web Services (Forum) by quasa on 2/20/2007
  • Re: Best practices / classes to use?

    As you should be returning the xml as fast as you can, I suggest using a fast forward only reader. Returning the xml as a string sounds perfect to me
    Posted to XML Web Services (Forum) by quasa on 2/20/2007
  • Re: Asynchronous Begin<methodname>

    Follow up, I used the wsdl command-line util to create the proxy, and that way I got my proxy class with the BeginGetCompanyName and EndGetCompanyName functions. my question however remains; Why does creating the web reference in my visual studio project, not create the exact same proxy...what am I doing wrong, any help, please ? following code is working static void Main() { StockLookupService lookup = new StockLookupService(); lookup.GetCompanyNameCompleted += new GetCompanyNameCompletedEventHandler
    Posted to XML Web Services (Forum) by quasa on 2/20/2007
  • Re: AsyncTask in web service

    take a peek here: http://msdn.microsoft.com/msdnmag/issues/06/07/ExtremeASPNET/default.aspx A webservice proxy always implements a synchronous method and an asynchrouns method for you to call the webmethod. I guess the Async=trye property of a webpage just tells the framework that asynchrounous requests will occurr when processing the page. Anyway, I hope the link will give you more insight.
    Posted to XML Web Services (Forum) by quasa on 2/19/2007
  • Asynchronous Begin<methodname>

    I created a sample stock webservice with a webmethod GetCompanyName(string symbol ) As a client I reference the asmx and I'm able to call the GetCompanyNameAsyn function, and setting the completed event handler However I should also be able to use the BeginGetCompanyName and EndGetCompanyName functions. But there are no such functions (BeginGetCompanyName, EndGetCompanyName) generated by the proxy? Is there a simple explaination for this?
    Posted to XML Web Services (Forum) by quasa on 2/19/2007
  • Re: How to do a language switch in a master page.

    LastCultureName prop needs following small change, othewise first time "null" gets returned, which throws an exception at the CurrentCulture setting.: public string LastCultureName { get { string lastCultureName = ( string )Session[ "_lastCulture" ]; if (lastCultureName == null ){ Session[ "_lastCulture" ] = Thread.CurrentThread.CurrentCulture.Name; lastCultureName = Thread.CurrentThread.CurrentCulture.Name; } return lastCultureName; } set { Session[ "_lastCulture" ] = value ; } }
    Posted to FAQ - Frequently Asked Questions (Forum) by quasa on 6/28/2006
Page 1 of 1 (6 items)